[PATCH] D51048: cmake: Specify reference outputs in llvm_test_data()

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 30 15:15:19 PDT 2018


MatzeB updated this revision to Diff 163428.
MatzeB added a comment.

In https://reviews.llvm.org/D51048#1219748, @proton wrote:

> After applying this patch, the tests fail for me because it is taking the hash of stdout instead of the file mentioned in **llvm_test_verify_hash_program_output** macro. 
>  Changing line 64 of `cmake/modules/SingleMultiSource.cmake` to **${CMAKE_SOURCE_DIR}/HashProgramOutput.sh ${file}** will fix this.


Yes sorry, I had fixed this in my local copy too but failed to update the review.

> Using  **llvm_test_verify(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}** after **llvm_test_verify_hash_program_output** is redundant as it is already called in **llvm_test_verify_hash_program_output**.

I don't understand this. `llvm_test_verify_hash_program_output()` only inserts a hashing step to the verification script, you still need the final `fpcmp` invocation (and the WORKDIR setting is separate for every step).

> I think it might be better if **llvm_test_verify_hash_program_output** supports multiple files at a time as it will decrease the length of cmake files (cmake files of Blur, Dither, and Interpolation have multiple reference files and other benchmarks might also have multiple reference files (if not now maybe in future)).

My motivation there was to not rewrite these `CMakeFiles` much more than necessary. You can probably shorten them by introducing a higher level macro that combines the hashing + fpcmp for multiple files. But that should be done in a separate commit.


Repository:
  rT test-suite

https://reviews.llvm.org/D51048

Files:
  MicroBenchmarks/ImageProcessing/AnisotropicDiffusion/CMakeLists.txt
  MicroBenchmarks/ImageProcessing/BilateralFiltering/CMakeLists.txt
  MicroBenchmarks/ImageProcessing/Blur/CMakeLists.txt
  MicroBenchmarks/ImageProcessing/Dilate/CMakeLists.txt
  MicroBenchmarks/ImageProcessing/Dither/CMakeLists.txt
  MicroBenchmarks/ImageProcessing/Interpolation/CMakeLists.txt
  MicroBenchmarks/harris/CMakeLists.txt
  cmake/modules/SingleMultiSource.cmake
  cmake/modules/TestFile.cmake
  cmake/modules/TestSuite.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51048.163428.patch
Type: text/x-patch
Size: 14459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180830/6baeeebd/attachment.bin>


More information about the llvm-commits mailing list