This is an archive of the discontinued LLVM Phabricator instance.

Hand port modfile01.f90 from test_modfile.sh to FileCheck
AbandonedPublic

Authored by richard.barton.arm on Jul 7 2020, 9:22 AM.

Details

Reviewers
DavidTruby
Summary

Sample of a test_modfile.sh port to FileCheck to support an RFC

Summary of changes:

  • Create module files in a temporary directory using -module to isolate the tests from eachother.
  • Use ls and wc to replace test_modfile.sh's check that no additional modules were created.
  • Separate, explicit RUN line to check each module content with FileCheck.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
tskeith added a subscriber: tskeith.Jul 7 2020, 2:18 PM
tskeith added inline comments.
flang/test/Semantics/modfile01.f90
1

It looks like the temp directory could still be there from the previous run. Does it get cleaned up?

test_modfile.sh has the same problem, dating back to the port to lit.

9

Where is this sed command?

DavidTruby added inline comments.Jul 16 2020, 8:10 AM
flang/test/Semantics/modfile01.f90
5–6

I think this can be written as:
RUN: test $(ls-l %t/dir/*.mod | wc -l) -eq 4
which would avoid the extra check prefix and call to filecheck.

Never got time to come back to this