[llvm] ef4b3a4 - [NFCI][lit] Unbreak more lit self-tests after D98179

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 05:26:22 PDT 2021


Author: Roman Lebedev
Date: 2021-03-22T15:25:32+03:00
New Revision: ef4b3a4571e26763fca1fdd3aa6f902806111866

URL: https://github.com/llvm/llvm-project/commit/ef4b3a4571e26763fca1fdd3aa6f902806111866
DIFF: https://github.com/llvm/llvm-project/commit/ef4b3a4571e26763fca1fdd3aa6f902806111866.diff

LOG: [NFCI][lit] Unbreak more lit self-tests after D98179

All of these depend on the order of tests, so if one runs them twice,
the tests within them will naturally be reordered
using the previous run times, which breaks them.

Added: 
    

Modified: 
    llvm/utils/lit/tests/custom-result-category.py
    llvm/utils/lit/tests/googletest-format.py
    llvm/utils/lit/tests/googletest-upstream-format.py
    llvm/utils/lit/tests/progress-bar.py
    llvm/utils/lit/tests/reorder.py
    llvm/utils/lit/tests/shtest-env.py
    llvm/utils/lit/tests/shtest-format.py
    llvm/utils/lit/tests/shtest-not.py
    llvm/utils/lit/tests/shtest-run-at-line.py
    llvm/utils/lit/tests/shtest-shell.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/tests/custom-result-category.py b/llvm/utils/lit/tests/custom-result-category.py
index 8a374e393a96..d4608b39a1c7 100644
--- a/llvm/utils/lit/tests/custom-result-category.py
+++ b/llvm/utils/lit/tests/custom-result-category.py
@@ -1,6 +1,9 @@
 # UNSUPPORTED: system-windows
 # Test lit.main.add_result_category() extension API.
 
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/custom-result-category/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 %{inputs}/custom-result-category | FileCheck %s
 
 # CHECK: CUSTOM_PASS: custom-result-category :: test1.txt

diff  --git a/llvm/utils/lit/tests/googletest-format.py b/llvm/utils/lit/tests/googletest-format.py
index 8ea2f8320d86..09aa9dedabc3 100644
--- a/llvm/utils/lit/tests/googletest-format.py
+++ b/llvm/utils/lit/tests/googletest-format.py
@@ -1,5 +1,8 @@
 # Check the various features of the GoogleTest format.
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/googletest-format/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 -v %{inputs}/googletest-format > %t.out
 # FIXME: Temporarily dump test output so we can debug failing tests on
 # buildbots.

diff  --git a/llvm/utils/lit/tests/googletest-upstream-format.py b/llvm/utils/lit/tests/googletest-upstream-format.py
index a620877fc010..517da4aa921e 100644
--- a/llvm/utils/lit/tests/googletest-upstream-format.py
+++ b/llvm/utils/lit/tests/googletest-upstream-format.py
@@ -1,5 +1,8 @@
 # Check the various features of the GoogleTest format.
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/googletest-upstream-format/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 -v %{inputs}/googletest-upstream-format > %t.out
 # RUN: FileCheck < %t.out %s
 #

diff  --git a/llvm/utils/lit/tests/progress-bar.py b/llvm/utils/lit/tests/progress-bar.py
index ceeca68712bf..e6dafffae879 100644
--- a/llvm/utils/lit/tests/progress-bar.py
+++ b/llvm/utils/lit/tests/progress-bar.py
@@ -1,5 +1,8 @@
 # Check the simple progress bar.
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/progress-bar/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 -s %{inputs}/progress-bar > %t.out
 # RUN: FileCheck < %t.out %s
 #

diff  --git a/llvm/utils/lit/tests/reorder.py b/llvm/utils/lit/tests/reorder.py
index 7c9dc8d21fe3..8e5ecda22219 100644
--- a/llvm/utils/lit/tests/reorder.py
+++ b/llvm/utils/lit/tests/reorder.py
@@ -3,6 +3,7 @@
 # RUN: cp %{inputs}/reorder/.lit_test_times.txt %{inputs}/reorder/.lit_test_times.txt.orig
 # RUN: %{lit} -j1 %{inputs}/reorder | FileCheck %s
 # RUN: not 
diff  %{inputs}/reorder/.lit_test_times.txt %{inputs}/reorder/.lit_test_times.txt.orig
+# RUN: cp %{inputs}/reorder/.lit_test_times.txt.orig %{inputs}/reorder/.lit_test_times.txt
 # END.
 
 # CHECK:     -- Testing: 3 tests, 1 workers --

diff  --git a/llvm/utils/lit/tests/shtest-env.py b/llvm/utils/lit/tests/shtest-env.py
index a4ddc0c9e31f..ead217ace361 100644
--- a/llvm/utils/lit/tests/shtest-env.py
+++ b/llvm/utils/lit/tests/shtest-env.py
@@ -1,5 +1,8 @@
 # Check the env command
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/shtest-env/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 -a -v %{inputs}/shtest-env \
 # RUN: | FileCheck -match-full-lines %s
 #

diff  --git a/llvm/utils/lit/tests/shtest-format.py b/llvm/utils/lit/tests/shtest-format.py
index 5c483972f2d0..a15c0f950174 100644
--- a/llvm/utils/lit/tests/shtest-format.py
+++ b/llvm/utils/lit/tests/shtest-format.py
@@ -1,5 +1,8 @@
 # Check the various features of the ShTest format.
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/shtest-format/.lit_test_times.txt
+
 # RUN: rm -f %t.xml
 # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml > %t.out
 # RUN: FileCheck < %t.out %s

diff  --git a/llvm/utils/lit/tests/shtest-not.py b/llvm/utils/lit/tests/shtest-not.py
index d361ae8007fa..a391e7e60a32 100644
--- a/llvm/utils/lit/tests/shtest-not.py
+++ b/llvm/utils/lit/tests/shtest-not.py
@@ -1,5 +1,8 @@
 # Check the not command
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/shtest-not/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 -a -v %{inputs}/shtest-not \
 # RUN: | FileCheck -match-full-lines %s
 #

diff  --git a/llvm/utils/lit/tests/shtest-run-at-line.py b/llvm/utils/lit/tests/shtest-run-at-line.py
index cd0e08137ee5..bf47e6499cd2 100644
--- a/llvm/utils/lit/tests/shtest-run-at-line.py
+++ b/llvm/utils/lit/tests/shtest-run-at-line.py
@@ -1,6 +1,9 @@
 # Check that -vv makes the line number of the failing RUN command clear.
 # (-v is actually sufficient in the case of the internal shell.)
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/shtest-run-at-line/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 -vv %{inputs}/shtest-run-at-line > %t.out
 # RUN: FileCheck --input-file %t.out %s
 #

diff  --git a/llvm/utils/lit/tests/shtest-shell.py b/llvm/utils/lit/tests/shtest-shell.py
index 3f1ead3b297a..13cf05f304fa 100644
--- a/llvm/utils/lit/tests/shtest-shell.py
+++ b/llvm/utils/lit/tests/shtest-shell.py
@@ -1,5 +1,8 @@
 # Check the internal shell handling component of the ShTest format.
-#
+
+# FIXME: this test depends on order of tests
+# RUN: rm -f %{inputs}/shtest-shell/.lit_test_times.txt
+
 # RUN: not %{lit} -j 1 -v %{inputs}/shtest-shell > %t.out
 # FIXME: Temporarily dump test output so we can debug failing tests on
 # buildbots.
@@ -290,7 +293,7 @@
 
 # CHECK: FAIL: shtest-shell :: 
diff -r-error-0.txt
 # CHECK: *** TEST 'shtest-shell :: 
diff -r-error-0.txt' FAILED ***
-# CHECK: $ "
diff " "-r" 
+# CHECK: $ "
diff " "-r"
 # CHECK: # command output:
 # CHECK: Only in {{.*}}dir1: dir1unique
 # CHECK: Only in {{.*}}dir2: dir2unique
@@ -298,7 +301,7 @@
 
 # CHECK: FAIL: shtest-shell :: 
diff -r-error-1.txt
 # CHECK: *** TEST 'shtest-shell :: 
diff -r-error-1.txt' FAILED ***
-# CHECK: $ "
diff " "-r" 
+# CHECK: $ "
diff " "-r"
 # CHECK: # command output:
 # CHECK: *** {{.*}}dir1{{.*}}subdir{{.*}}f01
 # CHECK: --- {{.*}}dir2{{.*}}subdir{{.*}}f01
@@ -308,35 +311,35 @@
 
 # CHECK: FAIL: shtest-shell :: 
diff -r-error-2.txt
 # CHECK: *** TEST 'shtest-shell :: 
diff -r-error-2.txt' FAILED ***
-# CHECK: $ "
diff " "-r" 
+# CHECK: $ "
diff " "-r"
 # CHECK: # command output:
 # CHECK: Only in {{.*}}dir2: extrafile
 # CHECK: error: command failed with exit status: 1
 
 # CHECK: FAIL: shtest-shell :: 
diff -r-error-3.txt
 # CHECK: *** TEST 'shtest-shell :: 
diff -r-error-3.txt' FAILED ***
-# CHECK: $ "
diff " "-r" 
+# CHECK: $ "
diff " "-r"
 # CHECK: # command output:
 # CHECK: Only in {{.*}}dir1: extra_subdir
 # CHECK: error: command failed with exit status: 1
 
 # CHECK: FAIL: shtest-shell :: 
diff -r-error-4.txt
 # CHECK: *** TEST 'shtest-shell :: 
diff -r-error-4.txt' FAILED ***
-# CHECK: $ "
diff " "-r" 
+# CHECK: $ "
diff " "-r"
 # CHECK: # command output:
 # CHECK: File {{.*}}dir1{{.*}}extra_subdir is a directory while file {{.*}}dir2{{.*}}extra_subdir is a regular file
 # CHECK: error: command failed with exit status: 1
 
 # CHECK: FAIL: shtest-shell :: 
diff -r-error-5.txt
 # CHECK: *** TEST 'shtest-shell :: 
diff -r-error-5.txt' FAILED ***
-# CHECK: $ "
diff " "-r" 
+# CHECK: $ "
diff " "-r"
 # CHECK: # command output:
 # CHECK: Only in {{.*}}dir1: extra_subdir
 # CHECK: error: command failed with exit status: 1
 
 # CHECK: FAIL: shtest-shell :: 
diff -r-error-6.txt
 # CHECK: *** TEST 'shtest-shell :: 
diff -r-error-6.txt' FAILED ***
-# CHECK: $ "
diff " "-r" 
+# CHECK: $ "
diff " "-r"
 # CHECK: # command output:
 # CHECK: File {{.*}}dir1{{.*}}extra_file is a regular empty file while file {{.*}}dir2{{.*}}extra_file is a directory
 # CHECK: error: command failed with exit status: 1


        


More information about the llvm-commits mailing list