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

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Jun 21 05:14:37 PDT 2022


rovka created this revision.
rovka added reviewers: awarzynski, sscalpone, naromero77, Meinersbur, kiranchandramohan.
rovka added a project: Flang.
Herald added subscribers: jdoerfert, mgorny.
Herald added a project: All.
rovka requested review of this revision.

The tests in the FCVS suite use a lot of list-directed output, which may according
to the standard introduce arbitrary amounts of whitespace. This patch
adds the "-i" flag to the `fpcmp` invocation, so that it ignores
whitespace. It only does this for the FCVS tests. It leaves open the
possibility for future test suites, that rely less on list-directed output, to
be stricter about whitespace.


Repository:
  rT test-suite

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
@@ -46,6 +46,7 @@
 endif()
 
 set(FP_TOLERANCE 1.0e-11) # set by the most sensitive numerical test
+set(FP_IGNOREWHITESPACE ON) # list-directed output has flexible whitespace
 llvm_singlesource()
 
 file(COPY lit.local.cfg DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128260.438644.patch
Type: text/x-patch
Size: 996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220621/ce70333b/attachment.bin>


More information about the flang-commits mailing list