[PATCH] D70239: Fix up lit's tests to run in a multi-config environment

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 06:08:23 PST 2019


probinson created this revision.
probinson added reviewers: jdenny, yln.
Herald added subscribers: llvm-commits, delcypher.
Herald added a project: LLVM.

https://reviews.llvm.org/D70239

Files:
  llvm/utils/lit/tests/Inputs/selecting/lit.cfg
  llvm/utils/lit/tests/selecting.py


Index: llvm/utils/lit/tests/selecting.py
===================================================================
--- llvm/utils/lit/tests/selecting.py
+++ llvm/utils/lit/tests/selecting.py
@@ -4,8 +4,8 @@
 
 # Check that we exit with an error if we do not discover any tests, even with --allow-empty-runs.
 #
-# RUN: not %{lit} %{inputs}/nonexistent                    2>&1 | FileCheck --check-prefix=CHECK-BAD-PATH %s
-# RUN: not %{lit} %{inputs}/nonexistent --allow-empty-runs 2>&1 | FileCheck --check-prefix=CHECK-BAD-PATH %s
+# RUN: not %{lit} %{inputs}/selecting/nonexistent                    2>&1 | FileCheck --check-prefix=CHECK-BAD-PATH %s
+# RUN: not %{lit} %{inputs}/selecting/nonexistent --allow-empty-runs 2>&1 | FileCheck --check-prefix=CHECK-BAD-PATH %s
 # CHECK-BAD-PATH: Did not disover any tests for provided path(s).
 
 # Check that we exit with an error if we filter out all tests, but allow it with --allow-empty-runs.
Index: llvm/utils/lit/tests/Inputs/selecting/lit.cfg
===================================================================
--- /dev/null
+++ llvm/utils/lit/tests/Inputs/selecting/lit.cfg
@@ -0,0 +1,3 @@
+# A deliberately empty lit.cfg, so that the test for a nonexistent directory
+# doesn't inadvertently try to load lit/tests/lit.site.cfg (which will fail
+# in a multi-config environment such as Visual Studio or Xcode).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70239.229295.patch
Type: text/x-patch
Size: 1358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191114/b0ceda03/attachment.bin>


More information about the llvm-commits mailing list