[flang-commits] [flang] 65cd0d6 - [flang] Remove `%f18` from LIT configuration files
Andrzej Warzynski via flang-commits
flang-commits at lists.llvm.org
Thu May 6 01:43:13 PDT 2021
Author: Andrzej Warzynski
Date: 2021-05-06T08:42:25Z
New Revision: 65cd0d6be47730cefdd5be26c12f02ec59b4d08e
URL: https://github.com/llvm/llvm-project/commit/65cd0d6be47730cefdd5be26c12f02ec59b4d08e
DIFF: https://github.com/llvm/llvm-project/commit/65cd0d6be47730cefdd5be26c12f02ec59b4d08e.diff
LOG: [flang] Remove `%f18` from LIT configuration files
`%f18` was originally introduced to represent the old Flang driver,
`f18`. With the introduction of the new driver, `flang-new`, we have
been switching to `%flang` (compiler driver) and `%flang_fc1` (frontend
driver) as more generic alternatives.
As most tests have been portend to use the new LIT variables instead of
`%f18`, this is good time to remove it from lit.cfg.py. There's only one
test left that requires the old driver to run. It's updated with:
```
! REQUIRES: old-flang-driver
```
This way we preserve its semantics while reducing the number of
variables in LIT configuration.
Differential Revision: https://reviews.llvm.org/D101281
Added:
Modified:
flang/test/Driver/help-f18.f90
flang/test/lit.cfg.py
Removed:
################################################################################
diff --git a/flang/test/Driver/help-f18.f90 b/flang/test/Driver/help-f18.f90
index d6162954a872..c98e7f6f6ea6 100644
--- a/flang/test/Driver/help-f18.f90
+++ b/flang/test/Driver/help-f18.f90
@@ -1,7 +1,9 @@
-! RUN: %f18 -h 2>&1 | FileCheck %s
-! RUN: %f18 -help 2>&1 | FileCheck %s
-! RUN: %f18 --help 2>&1 | FileCheck %s
-! RUN: %f18 -? 2>&1 | FileCheck %s
+! REQUIRES: old-flang-driver
+
+! RUN: %flang -h 2>&1 | FileCheck %s
+! RUN: %flang -help 2>&1 | FileCheck %s
+! RUN: %flang --help 2>&1 | FileCheck %s
+! RUN: %flang -? 2>&1 | FileCheck %s
! CHECK: f18: LLVM Fortran compiler
diff --git a/flang/test/lit.cfg.py b/flang/test/lit.cfg.py
index c2c2e7b523ae..4109400087e5 100644
--- a/flang/test/lit.cfg.py
+++ b/flang/test/lit.cfg.py
@@ -42,6 +42,8 @@
# config.
if config.include_flang_new_driver_test:
config.available_features.add('new-flang-driver')
+else:
+ config.available_features.add('old-flang-driver')
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
@@ -62,11 +64,7 @@
# For each occurrence of a flang tool name, replace it with the full path to
# the build directory holding that tool.
-tools = [
- ToolSubst('%f18', command=FindTool('f18'),
- unresolved='fatal')
-]
-
+tools = []
if config.include_flang_new_driver_test:
tools.append(ToolSubst('%flang', command=FindTool('flang-new'), unresolved='fatal'))
tools.append(ToolSubst('%flang_fc1', command=FindTool('flang-new'),
More information about the flang-commits
mailing list