[PATCH] D97197: [flang][driver] Refine tests for module search directories
Tim Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 22 09:16:26 PST 2021
tskeith added a comment.
> make sure that f18 is tested when FLANG_BUILD_NEW_DRIVER is set to Off
I don't think any of the tests in `flang/test/Flang-Driver` are run when that flag is Off, due to the configuration in `flang/test/lit.cfg.py`. That's why I added `flang/test/Driver/write-module.f90` in D97164 <https://reviews.llvm.org/D97164>. Those tests are run in either configuration.
================
Comment at: flang/test/Flang-Driver/Inputs/module-dir/basictestmoduleone.mod:3
module basictestmoduleone
-type::t2
-end type
end
----------------
Rather than check in the `.mod` files (whose format can change at any time) it would be better to check in the Fortran source and compile it for tests that need it. It would make the tests less fragile.
================
Comment at: flang/test/Flang-Driver/use-module-error.f90:8
+!--------------------------
+! RUN: not %flang-new -fsyntax-only -J %S/Inputs/module-dir -J %S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=DOUBLEINCLUDE
+! RUN: not %flang-new -fsyntax-only -J %S/Inputs/module-dir -module-dir %S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=DOUBLEINCLUDE
----------------
For tests like this that require the new driver, it would be better to use `%flang` rather than `%flang-new`. Otherwise in ten years it will still say `%flang-new` and people will wonder what's new about it.
================
Comment at: flang/test/Flang-Driver/use-module-error.f90:15
+!-----------------------------------------
+! RUN: not %flang-new -fc1 -fsyntax-only -J %S/Inputs/module-dir -J %S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=DOUBLEINCLUDE
+! RUN: not %flang-new -fc1 -fsyntax-only -J %S/Inputs/module-dir -module-dir %S/Inputs/ %s 2>&1 | FileCheck %s --check-prefix=DOUBLEINCLUDE
----------------
Same here: use `%flang_fc1`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97197/new/
https://reviews.llvm.org/D97197
More information about the llvm-commits
mailing list