[test-suite] r276131 - [test-suite] Supress warnings of missing reference output files.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 20 08:37:45 PDT 2016
Author: asbirlea
Date: Wed Jul 20 10:37:45 2016
New Revision: 276131
URL: http://llvm.org/viewvc/llvm-project?rev=276131&view=rev
Log:
[test-suite] Supress warnings of missing reference output files.
Summary:
For the Bitcode tests, there is a large number of tests that do not have or need a reference file, leading to a warning for each test.
Yet, it's still cleaner to use the same methods in SingleMultiSource.cmake which trigger the warning.
Add a new variable NO_REFERENCE_OUTPUT, checked in SingleMultiSource.cmake
before setting the reference file. Set this variable to supress the warnings.
Alternative suggestions on addressing this are welcome.
Reviewers: llvm-commits, MatzeB, mehdi_amini
Differential Revision: https://reviews.llvm.org/D22548
Modified:
test-suite/trunk/Bitcode/Regression/CMakeLists.txt
test-suite/trunk/Bitcode/simd_ops/CMakeLists.txt
test-suite/trunk/cmake/modules/SingleMultiSource.cmake
Modified: test-suite/trunk/Bitcode/Regression/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Bitcode/Regression/CMakeLists.txt?rev=276131&r1=276130&r2=276131&view=diff
==============================================================================
--- test-suite/trunk/Bitcode/Regression/CMakeLists.txt (original)
+++ test-suite/trunk/Bitcode/Regression/CMakeLists.txt Wed Jul 20 10:37:45 2016
@@ -1,3 +1,4 @@
+set(NO_REFERENCE_OUTPUT true)
if(ARCH STREQUAL "x86")
add_subdirectory(vector_widen)
endif()
Modified: test-suite/trunk/Bitcode/simd_ops/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Bitcode/simd_ops/CMakeLists.txt?rev=276131&r1=276130&r2=276131&view=diff
==============================================================================
--- test-suite/trunk/Bitcode/simd_ops/CMakeLists.txt (original)
+++ test-suite/trunk/Bitcode/simd_ops/CMakeLists.txt Wed Jul 20 10:37:45 2016
@@ -1,3 +1,4 @@
+set(NO_REFERENCE_OUTPUT true)
file(GLOB uosources ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}_tests/*.bc)
SET_SOURCE_FILES_PROPERTIES(${uosources} PROPERTIES LANGUAGE CXX)
file(GLOB scalar_sources ${CMAKE_CURRENT_SOURCE_DIR}/${ARCH}_scalar_tests/*.bc)
Modified: test-suite/trunk/cmake/modules/SingleMultiSource.cmake
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/cmake/modules/SingleMultiSource.cmake?rev=276131&r1=276130&r2=276131&view=diff
==============================================================================
--- test-suite/trunk/cmake/modules/SingleMultiSource.cmake (original)
+++ test-suite/trunk/cmake/modules/SingleMultiSource.cmake Wed Jul 20 10:37:45 2016
@@ -90,16 +90,18 @@ function(llvm_test_traditional testfile
endif()
# Pick the best reference output based on "programname.reference_output".
- if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian.${KEY})
- set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian.${KEY})
- elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${KEY})
- set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${KEY})
- elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian)
- set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian)
- elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output)
- set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output)
- else()
- message("-- No reference output found for test ${name}")
+ if(NOT DEFINED NO_REFERENCE_OUTPUT)
+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian.${KEY})
+ set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian.${KEY})
+ elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${KEY})
+ set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${KEY})
+ elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian)
+ set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output.${ENDIAN}-endian)
+ elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output)
+ set(REFERENCE_OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${name}.reference_output)
+ else()
+ message("-- No reference output found for test ${name}")
+ endif()
endif()
set(DIFFPROG ${CMAKE_BINARY_DIR}/tools/fpcmp)
More information about the llvm-commits
mailing list