This is an archive of the discontinued LLVM Phabricator instance.

[flang][driver] Merge test/Driver and test/Flang-Driver directories
ClosedPublic

Authored by awarzynski on Mar 9 2021, 6:18 AM.

Details

Summary

Until now we've been maintaining 2 test directories for Flang's drivers:

  • test/Driver for f18 (the current driver)
  • test/Flang-Driver for flang-new (the new driver)

As we have started sharing tests between the drivers, this separation is
no longer required. This patch merges the two test directories.

A few notable changes:

  • Driver/version-test.f90 and Flang-Driver/driver-version.f90 are replaced with Driver/driver-version.f90
  • Driver/no-files.f90 is updated so that it can be used for the new driver too. The file is renamed as input-from-stdin-unparse.f90 to better reflect what is testeed.
  • Driver/write-module.f90 is deleted in favour of Flang-Driver/write-module.f90 (see https://reviews.llvm.org/D97197 for more context)
  • When reading from stdin, f18 will now assume -fsyntax-only (for consistency with flang-new and to allow Driver/no-files.f90 to be shared)

Diff Detail

Event Timeline

awarzynski created this revision.Mar 9 2021, 6:18 AM
awarzynski requested review of this revision.Mar 9 2021, 6:18 AM
Herald added a project: Restricted Project. · View Herald Transcript
tskeith added a subscriber: tskeith.Mar 9 2021, 6:59 AM

In general, I don't think it's necessary to have tests specifically for the old driver. Testing the functionality they have in common is good enough. The two I pointed out are pretty trivial anyway.

flang/test/Driver/driver-version.f90
4

I think it would be okay to make this one require the new driver.

"suite" -> "suit"

flang/test/Driver/input-from-stdin-unparse.f90
5 ↗(On Diff #329314)

I think it's okay to get rid of this one.

awarzynski updated this revision to Diff 329350.Mar 9 2021, 8:02 AM

Address comments from @tskeith

  • Removed input-from-stdin-unparse.f90
  • Restored the original Flang-Driver/driver-version.f90 test (it will only work with flang-new)
awarzynski added a project: Restricted Project.
tskeith accepted this revision.Mar 9 2021, 9:57 AM

LGTM

flang/tools/f18/f18.cpp
750

I don't think this change is needed any more.

This revision is now accepted and ready to land.Mar 9 2021, 9:57 AM
awarzynski added inline comments.Mar 10 2021, 3:36 AM
flang/tools/f18/f18.cpp
750

I will revert this before merging, thank you!

flang/test/Flang-Driver/predefined-macros-compiler-version.f90