[libcxx-commits] [PATCH] D89495: [libc++] Use the internal Lit shell to run the tests

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 30 14:14:19 PDT 2021


ldionne updated this revision to Diff 342033.
ldionne added a comment.

Add UNSUPPORTED on Windows


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89495/new/

https://reviews.llvm.org/D89495

Files:
  libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp
  libcxx/test/libcxx/selftest/sh.cpp/run-error.sh.cpp
  libcxx/test/libcxx/selftest/sh.cpp/run-success.sh.cpp
  libcxx/utils/libcxx/test/format.py


Index: libcxx/utils/libcxx/test/format.py
===================================================================
--- libcxx/utils/libcxx/test/format.py
+++ libcxx/utils/libcxx/test/format.py
@@ -64,9 +64,7 @@
 
     # Get the default substitutions
     tmpDir, tmpBase = _getTempPaths(test)
-    useExternalSh = True
-    substitutions = lit.TestRunner.getDefaultSubstitutions(test, tmpDir, tmpBase,
-                                                           normalize_slashes=useExternalSh)
+    substitutions = lit.TestRunner.getDefaultSubstitutions(test, tmpDir, tmpBase)
 
     # Check base substitutions and add the %{build} and %{run} convenience substitutions
     _checkBaseSubstitutions(substitutions)
@@ -305,5 +303,5 @@
             return lit.Test.Result(lit.Test.XFAIL if test.isExpectedToFail() else lit.Test.PASS)
         else:
             _, tmpBase = _getTempPaths(test)
-            useExternalSh = True
+            useExternalSh = False
             return lit.TestRunner._runShTest(test, litConfig, useExternalSh, script, tmpBase)
Index: libcxx/test/libcxx/selftest/sh.cpp/run-success.sh.cpp
===================================================================
--- libcxx/test/libcxx/selftest/sh.cpp/run-success.sh.cpp
+++ libcxx/test/libcxx/selftest/sh.cpp/run-success.sh.cpp
@@ -8,4 +8,4 @@
 
 // Make sure the test passes if it succeeds to run
 
-// RUN: exit 0
+// RUN: true
Index: libcxx/test/libcxx/selftest/sh.cpp/run-error.sh.cpp
===================================================================
--- libcxx/test/libcxx/selftest/sh.cpp/run-error.sh.cpp
+++ libcxx/test/libcxx/selftest/sh.cpp/run-error.sh.cpp
@@ -10,4 +10,4 @@
 
 // Make sure the test DOES NOT pass if it fails to run
 
-// RUN: exit 1
+// RUN: false
Index: libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp
===================================================================
--- libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp
+++ libcxx/test/libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp
@@ -6,6 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+// This test greps for %t, which is expanded to a path with backslashes. When
+// that is passed to grep, those backslashes would have to be escaped, which we
+// don't do right now.
+// UNSUPPORTED: windows
+
 // Make sure that substitutions are performed inside additional compiler flags.
 
 // ADDITIONAL_COMPILE_FLAGS: -I %t.1


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89495.342033.patch
Type: text/x-patch
Size: 2534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210430/1531a221/attachment-0001.bin>


More information about the libcxx-commits mailing list