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"
# -------------------------------------------------------------------------
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
# -------------------------------------------------------------------------
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