From c9e700042b7e3af0ce830f930ec121af15c2ec52 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 26 Jul 2017 22:57:32 +0000 Subject: [PATCH] [lit] Fix race between shtest-shell and max-failures tests Previously these tests would use the same Output directory leading to flaky non-deterministic failures. llvm-svn: 309227 --- llvm/utils/lit/tests/Inputs/max-failures/lit.cfg | 6 ++++++ llvm/utils/lit/tests/max-failures.py | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 llvm/utils/lit/tests/Inputs/max-failures/lit.cfg diff --git a/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg b/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg new file mode 100644 index 000000000000..50d07566e1cc --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/max-failures/lit.cfg @@ -0,0 +1,6 @@ +import lit.formats +config.name = 'shtest-shell' +config.suffixes = ['.txt'] +config.test_format = lit.formats.ShTest() +config.test_source_root = os.path.dirname(__file__) + '/../shtest-shell' +config.test_exec_root = None diff --git a/llvm/utils/lit/tests/max-failures.py b/llvm/utils/lit/tests/max-failures.py index 5cc258dd08aa..bc58e9a4e47f 100644 --- a/llvm/utils/lit/tests/max-failures.py +++ b/llvm/utils/lit/tests/max-failures.py @@ -1,9 +1,9 @@ # Check the behavior of --max-failures option. # -# RUN: not %{lit} -j 1 -v %{inputs}/shtest-shell > %t.out -# RUN: not %{lit} --max-failures=1 -j 1 -v %{inputs}/shtest-shell >> %t.out -# RUN: not %{lit} --max-failures=2 -j 1 -v %{inputs}/shtest-shell >> %t.out -# RUN: not %{lit} --max-failures=0 -j 1 -v %{inputs}/shtest-shell 2>> %t.out +# RUN: not %{lit} -j 1 -v %{inputs}/max-failures > %t.out +# RUN: not %{lit} --max-failures=1 -j 1 -v %{inputs}/max-failures >> %t.out +# RUN: not %{lit} --max-failures=2 -j 1 -v %{inputs}/max-failures >> %t.out +# RUN: not %{lit} --max-failures=0 -j 1 -v %{inputs}/max-failures 2>> %t.out # RUN: FileCheck < %t.out %s # # END.