[PATCH] D133416: [lit] Test changes to make it work with bazel
Christian Sigg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 14:59:50 PDT 2022
csigg updated this revision to Diff 458575.
csigg added a comment.
Herald added subscribers: bzcheeseman, sdasgup3, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, stephenneuendorffer, liufengdb, aartbik, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, rriddle, mehdi_amini.
Herald added a project: MLIR.
Include mlir/lit.cfg.py change.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133416/new/
https://reviews.llvm.org/D133416
Files:
llvm/utils/lit/tests/Inputs/reorder/.lit_test_times.txt
llvm/utils/lit/tests/Inputs/reorder/lit_test_times
llvm/utils/lit/tests/lit.cfg
llvm/utils/lit/tests/reorder.py
mlir/test/lit.cfg.py
Index: mlir/test/lit.cfg.py
===================================================================
--- mlir/test/lit.cfg.py
+++ mlir/test/lit.cfg.py
@@ -66,7 +66,9 @@
'mlir-cpu-runner',
'mlir-linalg-ods-yaml-gen',
'mlir-reduce',
+ 'mlir-spirv-cpu-runner',
'mlir-pdll',
+ 'not',
]
# The following tools are optional
Index: llvm/utils/lit/tests/reorder.py
===================================================================
--- llvm/utils/lit/tests/reorder.py
+++ llvm/utils/lit/tests/reorder.py
@@ -1,11 +1,8 @@
## Check that we can reorder test runs.
-# RUN: cp %{inputs}/reorder/.lit_test_times.txt %{inputs}/reorder/.lit_test_times.txt.orig
+# RUN: cp %{inputs}/reorder/lit_test_times %{inputs}/reorder/.lit_test_times.txt
# RUN: not %{lit-no-order-opt} %{inputs}/reorder > %t.out
-# RUN: cp %{inputs}/reorder/.lit_test_times.txt %{inputs}/reorder/.lit_test_times.txt.new
-# RUN: cp %{inputs}/reorder/.lit_test_times.txt.orig %{inputs}/reorder/.lit_test_times.txt
-# RUN: not diff %{inputs}/reorder/.lit_test_times.txt.new %{inputs}/reorder/.lit_test_times.txt.orig
-# RUN: FileCheck --check-prefix=TIMES --implicit-check-not= < %{inputs}/reorder/.lit_test_times.txt.new %s
+# RUN: FileCheck --check-prefix=TIMES < %{inputs}/reorder/.lit_test_times.txt %s
# RUN: FileCheck < %t.out %s
# END.
Index: llvm/utils/lit/tests/lit.cfg
===================================================================
--- llvm/utils/lit/tests/lit.cfg
+++ llvm/utils/lit/tests/lit.cfg
@@ -35,12 +35,13 @@
lit_path = os.path.join(llvm_src_root, 'utils', 'lit')
else:
lit_path = os.path.join(config.test_source_root, '..')
+lit_path = os.path.abspath(lit_path)
# Required because some tests import the lit module
if llvm_config:
llvm_config.with_environment('PYTHONPATH', lit_path, append_path=True)
else:
- config.environment['PYTHONPATH'] = os.pathsep.join([lit_path])
+ config.environment['PYTHONPATH'] = lit_path
# Do not add user-site packages directory to the python search path. This avoids test failures if there's an
# incompatible lit module installed inside the user-site packages directory, as it gets prioritized over the lit
# from the PYTHONPATH.
@@ -60,8 +61,7 @@
# that can affect FileCheck's output. It also includes "--order=lexical -j1"
# to ensure predictable test order, as it is often required for FileCheck
# matches.
-config.substitutions.append(('%{inputs}', os.path.join(
- config.test_source_root, 'Inputs')))
+config.substitutions.append(('%{inputs}', 'Inputs'))
config.substitutions.append(('%{lit}', '%{lit-no-order-opt} --order=lexical'))
config.substitutions.append(('%{lit-no-order-opt}',
"{env} %{{python}} {lit} -j1".format(
Index: llvm/utils/lit/tests/Inputs/reorder/.lit_test_times.txt
===================================================================
--- /dev/null
+++ llvm/utils/lit/tests/Inputs/reorder/.lit_test_times.txt
@@ -1,5 +0,0 @@
-42.0 not-executed.txt
-3.0 subdir/ccc.txt
-2.0 bbb.txt
--0.2 fff.txt
-0.1 aaa.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133416.458575.patch
Type: text/x-patch
Size: 3011 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220907/62514d80/attachment.bin>
More information about the llvm-commits
mailing list