[libcxx-commits] [libcxx] f1a96de - [libc++] Don't run tests in a shell in the default executor
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Nov 4 05:29:12 PST 2020
Author: Louis Dionne
Date: 2020-11-04T08:29:05-05:00
New Revision: f1a96de1bc8db527b5eb820c36c17e275900ca2b
URL: https://github.com/llvm/llvm-project/commit/f1a96de1bc8db527b5eb820c36c17e275900ca2b
DIFF: https://github.com/llvm/llvm-project/commit/f1a96de1bc8db527b5eb820c36c17e275900ca2b.diff
LOG: [libc++] Don't run tests in a shell in the default executor
Added:
Modified:
libcxx/utils/run.py
Removed:
libcxx/test/libcxx/selftest/shell-escape-pipes.sh.cpp
################################################################################
diff --git a/libcxx/test/libcxx/selftest/shell-escape-pipes.sh.cpp b/libcxx/test/libcxx/selftest/shell-escape-pipes.sh.cpp
deleted file mode 100644
index 194ad53da53b..000000000000
--- a/libcxx/test/libcxx/selftest/shell-escape-pipes.sh.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Make sure manually escaped pipes are handled properly by the shell.
-// Specifically, we want to make sure that if we escape a pipe after %{exec},
-// it gets executed by the %{exec} substitution, as opposed to the result of
-// the %{exec} substitution being piped into the following command.
-//
-// This is a bit tricky to test. To test this, we basically want to ensure
-// that both sides of the pipe are executed inside %{exec}. When we're inside
-// %{exec}, the one
diff erence we can rely on is that we're in a temporary
-// directory with all file dependencies satisfied, so that's what we use.
-
-// RUN: touch %t.foobar
-// RUN: %{exec} echo \| ls > %t.out
-// RUN: grep -e ".foobar" %t.out
diff --git a/libcxx/utils/run.py b/libcxx/utils/run.py
index cdfa2387b22d..f8951ee43f59 100755
--- a/libcxx/utils/run.py
+++ b/libcxx/utils/run.py
@@ -39,7 +39,7 @@ def main():
env = {k : v for (k, v) in map(lambda s: s.split('=', 1), args.env)}
# Run the command line with the given environment in the execution directory.
- return subprocess.call(subprocess.list2cmdline(commandLine), cwd=args.execdir, env=env, shell=True)
+ return subprocess.call(commandLine, cwd=args.execdir, env=env, shell=False)
if __name__ == '__main__':
More information about the libcxx-commits
mailing list