run_cpp_test.sh 380 字节
Newer Older
L
luzzyzhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash

set -e

BASEDIR=$(readlink -f "$(dirname "$0")"/..)

export MGB_TEST_NO_LOG=1
export MGB_STABLE_RNG=1

function cpp_test {
    pushd /tmp/build/"${1}" >/dev/null
        ./dnn/test/megdnn_test
        ./test/megbrain_test
    popd >/dev/null
}


L
luzzyzhang 已提交
18 19 20
if [[ "$1" == "cpu" || "$1" == "cuda" ]] ; then
    cpp_test "$@"
else
L
luzzyzhang 已提交
21 22
    echo "Argument must cpu or cuda"
    exit 1
L
luzzyzhang 已提交
23
fi