[flang-commits] [PATCH] D149116: Enable "compile" tests from the gfortran torture test suite

Tarun Prabhu via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Apr 24 20:07:32 PDT 2023


tarunprabhu created this revision.
tarunprabhu added reviewers: lenary, kiranchandramohan, klausler, PeteSteinfeld, rovka, sscalpone.
Herald added a project: All.
tarunprabhu requested review of this revision.

The gfortran testsuite consists of "compile" and "execute" tests. The former test the behavior of the compiler while the latter test the executable produced by the compiler. Most of the "compile" tests don't produce an executable that can be run at test-time.

This patch enables them by working around some of the expected behavior of this test suite.

The tests are compiled along with the rest of the tests at build-time. Some of the "compile" tests are expected to raise an error. To work around this, at build-time, the compiler is invoked through a wrapper script which saves any diagnostics emitted by the compiler and always returns success. If the compilation succeeded, any object files produced are deleted immediately.

At test-time, the diagnostics saved at build-time are compared against the expected output. .

In addition, since the test suite expects to be able to run an executable at test-time, a dummy executable that does nothing is generated at build-time which is invoked for all tests at run-time.


Repository:
  rT test-suite

https://reviews.llvm.org/D149116

Files:
  Fortran/gfortran/compile-save-diags.cmake
  Fortran/gfortran/torture/compile/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149116.516604.patch
Type: text/x-patch
Size: 9392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230425/73e4834c/attachment-0001.bin>


More information about the flang-commits mailing list