From f1a96de1bc8db527b5eb820c36c17e275900ca2b Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 3 Nov 2020 14:45:52 -0500 Subject: [PATCH] [libc++] Don't run tests in a shell in the default executor --- .../libcxx/selftest/shell-escape-pipes.sh.cpp | 21 ------------------- libcxx/utils/run.py | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 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 difference 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__':