From: Joel Rosdahl Date: Sat, 27 Jan 2018 22:01:07 +0000 (+0100) Subject: test: Fix nvcc tests when using compiler with options X-Git-Tag: v3.4~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6b894921f79d4197148edfab55cdc98f30a3409;p=thirdparty%2Fccache.git test: Fix nvcc tests when using compiler with options --- diff --git a/test.sh b/test.sh index 6b27e2684..62940f738 100755 --- a/test.sh +++ b/test.sh @@ -377,8 +377,8 @@ cd $TESTDIR || exit 1 compiler_bin=$(echo $COMPILER | awk '{print $1}') compiler_args=$(echo $COMPILER | awk '{$1 = ""; print}') -real_compiler_bin=$(find_compiler $compiler_bin) -REAL_COMPILER="$real_compiler_bin$compiler_args" +REAL_COMPILER_BIN=$(find_compiler $compiler_bin) +REAL_COMPILER="$REAL_COMPILER_BIN$compiler_args" if [ "$REAL_COMPILER" = "$COMPILER" ]; then echo "Compiler: $COMPILER" diff --git a/test_suites/nvcc.sh b/test_suites/nvcc.sh index 3bf90bff0..3b713c0dc 100644 --- a/test_suites/nvcc.sh +++ b/test_suites/nvcc.sh @@ -195,17 +195,17 @@ nvcc_tests() { # ------------------------------------------------------------------------- TEST "Option --compiler-bindir" - $REAL_NVCC $nvcc_opts_cpp --compiler-bindir $REAL_COMPILER \ + $REAL_NVCC $nvcc_opts_cpp --compiler-bindir $REAL_COMPILER_BIN \ -o reference_test1.o test_cpp.cu # First compile. - $ccache_nvcc_cpp --compiler-bindir $REAL_COMPILER test_cpp.cu + $ccache_nvcc_cpp --compiler-bindir $REAL_COMPILER_BIN test_cpp.cu expect_stat 'cache hit (preprocessed)' 0 expect_stat 'cache miss' 1 expect_stat 'files in cache' 1 expect_equal_files reference_test1.o test_cpp.o - $ccache_nvcc_cpp --compiler-bindir $REAL_COMPILER test_cpp.cu + $ccache_nvcc_cpp --compiler-bindir $REAL_COMPILER_BIN test_cpp.cu expect_stat 'cache hit (preprocessed)' 1 expect_stat 'cache miss' 1 expect_stat 'files in cache' 1 @@ -214,17 +214,17 @@ nvcc_tests() { # ------------------------------------------------------------------------- TEST "Option -ccbin" - $REAL_NVCC $nvcc_opts_cpp -ccbin $REAL_COMPILER \ + $REAL_NVCC $nvcc_opts_cpp -ccbin $REAL_COMPILER_BIN \ -o reference_test1.o test_cpp.cu # First compile. - $ccache_nvcc_cpp -ccbin $REAL_COMPILER test_cpp.cu + $ccache_nvcc_cpp -ccbin $REAL_COMPILER_BIN test_cpp.cu expect_stat 'cache hit (preprocessed)' 0 expect_stat 'cache miss' 1 expect_stat 'files in cache' 1 expect_equal_files reference_test1.o test_cpp.o - $ccache_nvcc_cpp -ccbin $REAL_COMPILER test_cpp.cu + $ccache_nvcc_cpp -ccbin $REAL_COMPILER_BIN test_cpp.cu expect_stat 'cache hit (preprocessed)' 1 expect_stat 'cache miss' 1 expect_stat 'files in cache' 1 diff --git a/test_suites/nvcc_ldir.sh b/test_suites/nvcc_ldir.sh index 8905fe95f..132684d23 100644 --- a/test_suites/nvcc_ldir.sh +++ b/test_suites/nvcc_ldir.sh @@ -29,7 +29,7 @@ SUITE_nvcc_ldir_SETUP() { } SUITE_nvcc_ldir() { - nvcc_opts_cuda="-Wno-deprecated-gpu-targets -c -ccbin $REAL_COMPILER" + nvcc_opts_cuda="-Wno-deprecated-gpu-targets -c -ccbin $REAL_COMPILER_BIN" ccache_nvcc_cuda="$CCACHE $REAL_NVCC $nvcc_opts_cuda" cuobjdump="$REAL_CUOBJDUMP -all -elf -symbols -ptx -sass" nvcc_dir=$(dirname $REAL_NVCC)