[flang-commits] [PATCH] D128260: [Fortran] Ignore whitespace in FCVS test results

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jun 23 05:34:13 PDT 2022


rovka updated this revision to Diff 439354.
rovka edited the summary of this revision.
rovka added a comment.

Right, disable :) 
Updated the patch to special-case FM905 and FM907. I think it doesn't hurt to leave a bit of list-directed output in the test suite just to make sure it doesn't randomly explode.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128260/new/

https://reviews.llvm.org/D128260

Files:
  Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
  cmake/modules/SingleMultiSource.cmake


Index: cmake/modules/SingleMultiSource.cmake
===================================================================
--- cmake/modules/SingleMultiSource.cmake
+++ cmake/modules/SingleMultiSource.cmake
@@ -128,6 +128,9 @@
     if(FP_ABSTOLERANCE)
       set(DIFFPROG "${DIFFPROG} -a ${FP_ABSTOLERANCE}")
     endif()
+    if(FP_IGNOREWHITESPACE)
+      set(DIFFPROG "${DIFFPROG} -i")
+    endif()
     llvm_test_verify(${DIFFPROG} %o %S/${REFERENCE_OUTPUT})
     llvm_test_data(${target} ${REFERENCE_OUTPUT})
   endif()
Index: Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
===================================================================
--- Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
+++ Fortran/UnitTests/fcvs21_f95/CMakeLists.txt
@@ -33,7 +33,18 @@
 # clean-up fort.* files otherwise one of the tests will fail
 llvm_test_prepare(rm -f %S/fort.*)
 
+# Tests 905 and 907 use list-directed output, for which the standard allows some
+# flexibility. Treat them separately.
+set(SPECIAL_CASES "FM905.f" "FM907.f")
+set(Source ${SPECIAL_CASES})
+set(FP_IGNOREWHITESPACE ON)
+llvm_singlesource()
+set(Source)
+
 file(GLOB Source CONFIGURE_DEPENDS *.f)
+foreach (SPECIAL_CASE ${SPECIAL_CASES})
+  list(FILTER Source EXCLUDE REGEX ${SPECIAL_CASE})
+endforeach()
 
 # Test 509 requires this flag in more recent versions of GCC.
 # If this flag is not supported, the test should be excluded.
@@ -46,6 +57,7 @@
 endif()
 
 set(FP_TOLERANCE 1.0e-11) # set by the most sensitive numerical test
+set(FP_IGNOREWHITESPACE OFF)
 llvm_singlesource()
 
 file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128260.439354.patch
Type: text/x-patch
Size: 1602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220623/f03d8773/attachment-0001.bin>


More information about the flang-commits mailing list