run_cpp_test.sh 404 字节
Newer Older
L
luzzyzhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#!/bin/bash

set -e

BASEDIR=$(readlink -f "$(dirname "$0")"/..)
source "${BASEDIR}/ci/utils.sh"

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
}


if [[ "$1" != "cpu" && "$1" != "cuda" ]] ; then
    echo "Argument must cpu or cuda"
    exit 1
fi

cpp_test "$@"