[PATCH] D97197: [flang][driver] Refine tests for module search directories

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 08:25:18 PST 2021


awarzynski created this revision.
Herald added a reviewer: sscalpone.
awarzynski requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch refactors include-module.f90:

- rename the test file as use-module.f90 to better highlight which driver feature is being tested
- move tests for diagnostics to use-module-error.f90 (it tests that `-J/-module-dir` can only be used once)
- make sure that `f18` is tested when `FLANG_BUILD_NEW_DRIVER` is set to `Off`
- add tests for when all module files are successfully discovered and loaded

With this patch, there should be a clear separation into 3 scenarios in
use-module.f90:

- Everything is OK
- One module file wasn't found (missing include path for basictestingmoduletwo.mod)
- Two module files are found, but the test requires `basictestingmoduleone.mod` from both `Inputs` and `Inputs/module-dir`. Only the latter is found.

Depends on: D97164 <https://reviews.llvm.org/D97164>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97197

Files:
  flang/test/Flang-Driver/Inputs/module-dir/basictestmoduleone.mod
  flang/test/Flang-Driver/Inputs/module-dir/basictestmoduletwo.mod
  flang/test/Flang-Driver/include-module.f90
  flang/test/Flang-Driver/use-module-error.f90
  flang/test/Flang-Driver/use-module.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97197.325454.patch
Type: text/x-patch
Size: 10226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210222/9247895b/attachment-0001.bin>


More information about the llvm-commits mailing list