[Openmp-commits] [libcxx] [llvm] [openmp] [lit] Add a flag to disable lit time tests (PR #98270)
Vincent Lee via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jul 16 11:04:56 PDT 2024
================
@@ -0,0 +1,18 @@
+## Check that --skip-test-time-recording skips .lit_test_times.txt recording.
+
+# RUN: %{lit-no-order-opt} --skip-test-time-recording %{inputs}/time-tests
+# RUN: not ls %{inputs}/time-tests/.lit_test_times.txt > %t.out 2>&1
+# RUN: FileCheck --check-prefix=CHECK-NOFILE < %t.out %s
+
+## Check that --time-tests generates a printed histogram
+
+# RUN: %{lit-no-order-opt} --time-tests %{inputs}/time-tests > %t.out
+# RUN: FileCheck < %t.out %s
+# RUN: rm %{inputs}/time-tests/.lit_test_times.txt
+
+# CHECK-NOFILE: cannot access 'Inputs/time-tests/.lit_test_times.txt': No such file or directory
----------------
thevinster wrote:
> Not locale related as such, but No such file or directory is platform-specific and this will fail on other platforms.
Would a more reliable change be to verify that the `ls` command failed? I can't think of any other reasons why the `ls` would fail unless the file isn't found.
> In other parts of llvm, we have %errc_... substitutions to allow specifying the message via the FileCheck command-line.
I don't think we have that here. Lit's own test suite isn't as comprehensive as other test suites. We could add that functionality, but I'm not sure it's worth for this one specific use case.
https://github.com/llvm/llvm-project/pull/98270
More information about the Openmp-commits
mailing list