diff --git a/llvm/utils/lit/tests/Inputs/reorder/.lit_test_times.txt b/llvm/utils/lit/tests/Inputs/reorder/lit_test_times rename from llvm/utils/lit/tests/Inputs/reorder/.lit_test_times.txt rename to llvm/utils/lit/tests/Inputs/reorder/lit_test_times diff --git a/llvm/utils/lit/tests/lit.cfg b/llvm/utils/lit/tests/lit.cfg --- a/llvm/utils/lit/tests/lit.cfg +++ b/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( diff --git a/llvm/utils/lit/tests/reorder.py b/llvm/utils/lit/tests/reorder.py --- a/llvm/utils/lit/tests/reorder.py +++ b/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. diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py --- a/mlir/test/lit.cfg.py +++ b/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