2021-03-06 13:46:28 +01:00
|
|
|
#!/bin/bash
|
2019-06-06 14:21:15 +02:00
|
|
|
|
|
|
|
#
|
2021-02-01 06:31:20 +01:00
|
|
|
# /* ******************************************************************************
|
|
|
|
# *
|
|
|
|
# *
|
|
|
|
# * 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.
|
|
|
|
# *
|
2021-02-01 09:47:29 +01:00
|
|
|
# * See the NOTICE file distributed with this work for additional
|
|
|
|
# * information regarding copyright ownership.
|
2021-02-01 06:31:20 +01:00
|
|
|
# * 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
|
|
|
|
# ******************************************************************************/
|
2019-06-06 14:21:15 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2021-03-06 12:50:20 +01:00
|
|
|
unameOut="$(uname)"
|
|
|
|
echo "$OSTYPE"
|
2021-03-06 13:46:28 +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)
|
2021-03-06 13:46:28 +01:00
|
|
|
[ -f "${GTEST_OUTPUT#*:}" ] && cp -a surefire-reports/ ../target && rm -rf surefire-reports/
|