This is an archive of the discontinued LLVM Phabricator instance.

[Fortran/gfortran] Enable OpenMP "compile" tests in gfortran test suite
AbandonedPublic

Authored by tarunprabhu on Jun 21 2023, 8:17 AM.

Details

Summary

In addition to enabling the OpenMP "compile" tests, this also does the following:

Major reorganization of the build files. A lot of duplicated code was consolidated into a single location.

Cleanup of the build files.

The disabled tests are moved into their own file in each subdirectory instead of being present in the CMakeLists.txt file. Since we might want to eventually automate/semi-automate the process of enabling tests as features are added to flang, it seemed safer to have the list in a separate file where it could be parsed with a script instead of being embedded with other code.

The readme has been updated to reflect the newly enabled tests. Todo's have been added to it highlighting the limitations of the approach taken when enabling these tests.

For the moment, I have relied on the test command being present - either as part of the shell or a separate command in *nix systems (the tests are not enabled on Windows anyway). I am not sure if this reasonable and I am open to alternatives. What is really needed is LLVM's not utility to invert the return code of a diff utility. But that will require the build directory to be accessible at test-time and/or the not utility to be present on the system. I am not sure if we can rely on either of those.

EDIT: This also removes all references to -flang-experimental-exec since that flag is no longer needed and the patch landed while this was still under review.

Diff Detail

Repository
rT test-suite

Event Timeline

tarunprabhu created this revision.Jun 21 2023, 8:17 AM
Herald added a project: Restricted Project. · View Herald Transcript
tarunprabhu requested review of this revision.Jun 21 2023, 8:17 AM
tarunprabhu edited the summary of this revision. (Show Details)

Remove references to -flang-experimental-exec since that is no longer needed.

Updating diff since a separate patch to remove all references to -flang-experimental-exec landed.

Would it be possible to split this patch?
Something like:

  1. Move disabled tests into their own files
  2. Cleanup/refactoring
  3. Enable OpenMP "compile" tests

I think it would make it easier to review and to bisect issues later, if needed.

Would it be possible to split this patch?

I think so. Moving the disabled tests to their own file should be reasonable as a separate patch. The refactoring patch might still be fairly large - I'll try to split that up too if I can. After the refactor patch, the OpenMP one will be trivial.

tarunprabhu abandoned this revision.Jun 28 2023, 7:21 AM

As requested, this patch will be split into several smaller patches. The first of those is here.