]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Fix nvcc tests when using compiler with options
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 27 Jan 2018 22:01:07 +0000 (23:01 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 27 Jan 2018 22:01:07 +0000 (23:01 +0100)
test.sh
test_suites/nvcc.sh
test_suites/nvcc_ldir.sh

diff --git a/test.sh b/test.sh
index 6b27e2684b74e7f1a283fc1432636e8dc92c4d79..62940f738d99d5c209483c04eaa234dc0692f20a 100755 (executable)
--- 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"
index 3bf90bff098916cf415bb264a29eda536ccb7dbf..3b713c0dc402c4276d98806761fc8464b2e34637 100644 (file)
@@ -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
index 8905fe95f3164f6424aae0ace47ee33fab6eb8ba..132684d233c001b84d0ed88f48a2827d5a843f30 100644 (file)
@@ -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)