[libcxx-commits] [libcxx] 99f213e - [libc++] Fix the Lit DSL test in case a substitution is empty
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 30 11:54:36 PDT 2020
Author: Louis Dionne
Date: 2020-06-30T14:52:51-04:00
New Revision: 99f213e07c044fec0d527d177b40e05c014ac49d
URL: https://github.com/llvm/llvm-project/commit/99f213e07c044fec0d527d177b40e05c014ac49d
DIFF: https://github.com/llvm/llvm-project/commit/99f213e07c044fec0d527d177b40e05c014ac49d.diff
LOG: [libc++] Fix the Lit DSL test in case a substitution is empty
Added:
Modified:
libcxx/test/libcxx/selftest/dsl/dsl.sh.py
Removed:
################################################################################
diff --git a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py b/libcxx/test/libcxx/selftest/dsl/dsl.sh.py
index 7205f35e7dc5..ff4ac2147bf6 100644
--- a/libcxx/test/libcxx/selftest/dsl/dsl.sh.py
+++ b/libcxx/test/libcxx/selftest/dsl/dsl.sh.py
@@ -6,11 +6,15 @@
#
#===----------------------------------------------------------------------===##
-# RUN: %{python} %s %S %T %{escaped_exec} \
-# RUN: %{escaped_cxx} \
-# RUN: %{escaped_flags} \
-# RUN: %{escaped_compile_flags} \
-# RUN: %{escaped_link_flags}
+# Note: We prepend arguments with 'x' to avoid thinking there are too few
+# arguments in case an argument is an empty string.
+# RUN: %{python} %s x%S \
+# RUN: x%T \
+# RUN: x%{escaped_exec} \
+# RUN: x%{escaped_cxx} \
+# RUN: x%{escaped_flags} \
+# RUN: x%{escaped_compile_flags} \
+# RUN: x%{escaped_link_flags}
# END.
import base64
@@ -33,7 +37,8 @@
# Steal some parameters from the config running this test so that we can
# bootstrap our own TestingConfig.
-SOURCE_ROOT, EXEC_PATH, EXEC, CXX, FLAGS, COMPILE_FLAGS, LINK_FLAGS = sys.argv[1:8]
+args = list(map(lambda s: s[1:], sys.argv[1:8])) # Remove the leading 'x'
+SOURCE_ROOT, EXEC_PATH, EXEC, CXX, FLAGS, COMPILE_FLAGS, LINK_FLAGS = args
sys.argv[1:8] = []
class SetupConfigs(unittest.TestCase):
More information about the libcxx-commits
mailing list