2019-06-06 14:21:15 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Copyright (c) 2015-2018 Skymind, Inc.
|
|
|
|
#
|
|
|
|
# This program and the accompanying materials are made available under the
|
|
|
|
# terms of the Apache License, Version 2.0 which is available at
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
set -exo pipefail
|
|
|
|
|
2019-11-13 15:15:18 +01:00
|
|
|
while [[ $# > 0 ]]
|
|
|
|
do
|
|
|
|
key="$1"
|
|
|
|
value="${2:-}"
|
|
|
|
|
|
|
|
case $key in
|
|
|
|
-c|--chip)
|
|
|
|
CHIP="${value}"
|
|
|
|
shift # past argument
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# unknown option
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [[ $# > 0 ]]; then
|
|
|
|
shift # past argument or value
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
CHIP="${CHIP:-cpu}"
|
2020-02-04 06:59:11 +01:00
|
|
|
export GTEST_OUTPUT="xml:surefire-reports/TEST-${CHIP}-results.xml"
|
2019-11-13 15:15:18 +01:00
|
|
|
|
2019-06-06 14:21:15 +02:00
|
|
|
# On Mac, make sure it can find libraries for GCC
|
|
|
|
export DYLD_LIBRARY_PATH=/usr/local/lib/gcc/8/:/usr/local/lib/gcc/7/:/usr/local/lib/gcc/6/:/usr/local/lib/gcc/5/
|
|
|
|
|
|
|
|
# For Windows, add DLLs of MKL-DNN and OpenBLAS to the PATH
|
|
|
|
if [ -n "$BUILD_PATH" ]; then
|
|
|
|
if which cygpath; then
|
|
|
|
BUILD_PATH=$(cygpath -p $BUILD_PATH)
|
|
|
|
fi
|
|
|
|
export PATH="$PATH:$BUILD_PATH"
|
|
|
|
fi
|
|
|
|
|
2020-01-24 20:35:00 +01:00
|
|
|
../blasbuild/${CHIP}/tests_cpu/layers_tests/runtests
|
2020-02-04 06:59:11 +01:00
|
|
|
|
|
|
|
# Workaround to fix posix path conversion problem on Windows (http://mingw.org/wiki/Posix_path_conversion)
|
|
|
|
[ -f "${GTEST_OUTPUT#*:}" ] && cp -a surefire-reports/ ../target && rm -rf surefire-reports/
|