[flang-commits] [PATCH] D149116: [Fortran/gfortran] Enable "compile" tests from the gfortran torture test suite
Leandro Lupori via Phabricator via flang-commits
flang-commits at lists.llvm.org
Mon May 15 11:59:38 PDT 2023
luporl added a comment.
Thanks @tarunprabhu for this patch and for your work on porting gfortran
test-suite to LLVM.
It would really be better if llvm-test-suite could be improved to support
compile tests in a clean way, to avoid the need of workarounds that make
compile tests look like execute tests.
But I am not familiar with llvm-test-suite. Do you have an idea of
how much effort would be required?
With that said and assuming the required effort would be high, your
patch LGTM and IMHO we can use it while llvm-test-suite support isn't
ready, as it enables us to run several more tests.
It would also be nice to update Fortran/gfortran/README.md, unless you
are planning to do it later, when more compile tests are supported.
================
Comment at: Fortran/gfortran/compile-save-diags.cmake:12
+# used for the "compile" tests in this test. The "compile" tests exercise the
+# compiler's parser and semantic analyzer as wells as the diagnostics.
+
----------------
s/wells/well/
================
Comment at: Fortran/gfortran/compile-save-diags.cmake:39
+file(WRITE "${OUTPUT_FILE}" "")
+if (ALWAYS_SAVE_DIAGS)
+ file(APPEND "${OUTPUT_FILE}" "${ERRVAR}")
----------------
The `if` and `elseif` can be merged. Something like:
`if (ALWAYS_SAVE_DIAGS OR NOT "${RETVAR}" EQUAL "0")`
================
Comment at: Fortran/gfortran/torture/compile/CMakeLists.txt:13
+# whether the test has succeeded. The "compile" tests are intended to exercise
+# the behavior of the compier itself. There isn't a clean way of having the
+# compiler be executed at test time. Instead, the compiler is run at
----------------
s/compier/compiler/
================
Comment at: Fortran/gfortran/torture/compile/CMakeLists.txt:97
+ # All the "compile" tests in the gfortran torture tests are expected to
+ # pass. Since diagnostics are only saved only failure, the diagnostics
+ # file produced when compiling the test should be empty. An empty file can,
----------------
Do you mean "only saved on failure"?
================
Comment at: Fortran/gfortran/torture/compile/CMakeLists.txt:159-162
+list(APPEND UnsupportedTests "")
+list(APPEND UnimplementedTests "")
+list(APPEND SkippedTests "")
+list(APPEND FailingTests "${Failing}")
----------------
Is it expected that UnsupportedTests/UnimplementedTests/SkippedTests will receive entries when more compile tests are enabled?
Repository:
rT test-suite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149116/new/
https://reviews.llvm.org/D149116
More information about the flang-commits
mailing list