From 6bd09b38889f54d70069cf8b4c44f8fb1686882d Mon Sep 17 00:00:00 2001 From: luzzyzhang Date: Thu, 16 Apr 2020 10:40:36 +0800 Subject: [PATCH] ci: refactor run cpp test script --- ci/run_cpp_test.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ci/run_cpp_test.sh b/ci/run_cpp_test.sh index 2b4714d6a..1e0e16ebc 100755 --- a/ci/run_cpp_test.sh +++ b/ci/run_cpp_test.sh @@ -3,7 +3,6 @@ set -e BASEDIR=$(readlink -f "$(dirname "$0")"/..) -source "${BASEDIR}/ci/utils.sh" export MGB_TEST_NO_LOG=1 export MGB_STABLE_RNG=1 @@ -16,9 +15,9 @@ function cpp_test { } -if [[ "$1" != "cpu" && "$1" != "cuda" ]] ; then +if [[ "$1" == "cpu" || "$1" == "cuda" ]] ; then + cpp_test "$@" +else echo "Argument must cpu or cuda" exit 1 -fi - -cpp_test "$@" \ No newline at end of file +fi \ No newline at end of file -- GitLab