run_test.sh 862 Bytes
Newer Older
1
#!/bin/bash
2
set -e
3

4 5 6 7 8
echo "--TRAVIS VARIABLES--"
echo "TRAVIS_OS_NAME:" ${TRAVIS_OS_NAME}
echo "TRAVIS_BUILD_DIR:" ${TRAVIS_BUILD_DIR}

echo "--CUSTOM VARIABLES--"
9
echo "TASK:" ${TASK}
10
echo "OS:" ${OS}
11

12 13 14 15 16 17 18 19
# LINUX TASKS
if [ ${TRAVIS_OS_NAME} == "linux" ]; then

    if [ ${TASK} == "cpp_test" ]; then
        docker run -w '/root/ngraph/build' test_ngraph make unit-test-check
    fi

    if [ ${TASK} == "python2_test" ]; then
20
        docker run -w '/root/ngraph/python' -e NGRAPH_ONNX_IMPORT_ENABLE=TRUE test_ngraph tox -e py27
21 22 23
    fi

    if [ ${TASK} == "python3_test" ]; then
24
        docker run -w '/root/ngraph/python' -e NGRAPH_ONNX_IMPORT_ENABLE=TRUE test_ngraph tox -e py3
25
    fi
26 27 28

fi

29 30 31 32 33 34 35 36
# MacOS TASKS
if [ ${TRAVIS_OS_NAME} == "osx" ]; then

    if [ ${TASK} == "cpp_test" ]; then
        cd ${TRAVIS_BUILD_DIR}/build
        make unit-test-check
    fi

37
fi