Skip to content

Commit 24c82a8

Browse files
authored
Fix spurious errors in halide tests (#159)
We occasionally see spurious llvm-test-suite failures with the following error message: CMake Error: failed to create symbolic link '/tmp/tmp.x1PxF3OhCA/Bitcode/Benchmarks/Halide/local_laplacian/../images/rgb.bytes': File exists The reason for this is that two halide tests try to copy a test input to the same location, and create_symlink can fail if these calls race. Fix this by putting the inputs for the tests into different directories, by not making ".." part of the result directory.
1 parent 9d32ec8 commit 24c82a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Bitcode/Benchmarks/Halide/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ if(NOT MSVC)
1010
endif()
1111

1212
macro(test_img_input img)
13-
llvm_test_run(%S/../images/${img}.bytes ${ARGN} %S/${img}_out.bytes)
13+
llvm_test_run(%S/images/${img}.bytes ${ARGN} %S/${img}_out.bytes)
1414
llvm_test_verify(%b/${FPCMP} %S/output/${img}_out.bytes %S/${img}_out.bytes)
1515
endmacro()
1616
macro(test_img_data target img)
17-
llvm_test_data(${target} ../images/${img}.bytes)
17+
llvm_test_data(${target} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/.. images/${img}.bytes)
1818
llvm_test_data(${target} output/${img}_out.bytes)
1919
endmacro()
2020

0 commit comments

Comments
 (0)