llvm-project/libcxx/test/std/input.output/iostream.objects
Martin Storsjö d67b25e7f6 [libcxx] [test] Extend test for bash for executor-has-no-bash
If %{exec} sets "--env PATH=single-dir", the directory containing
bash and related shell utils is omitted from the path, which means
that most shell scripts would fail.

(Setting PATH is needed for DLL builds on Windows; PATH fills the same
role as e.g. LD_LIBRARY_PATH on Linux.)

This condition is missed in the current test, because the executor
run.py first resolves the executable to run using the original path,
then invokes that executable with an environment with a restricted
path. Thus the executor is able to run bash, but that bash is then
unable to run further shell commands (other than bash builtins).

Extend the test from "bash --version" to "bash -c 'bash --version'".
This correctly identifies the executor-has-no-bash condition in the
current Windows CI configs, allowing removing 6 cases of
LIBCXX-WINDOWS-FIXME.

Another longterm fix would be to extend run.py with an option like
"--env-prepend PATH=dir", to allow keeping the current path while
adding a directory to it.

Differential Revision: https://reviews.llvm.org/D116117
2021-12-22 00:43:29 +02:00
..
narrow.stream.objects [libcxx] [test] Extend test for bash for executor-has-no-bash 2021-12-22 00:43:29 +02:00
wide.stream.objects [libcxx] [test] Extend test for bash for executor-has-no-bash 2021-12-22 00:43:29 +02:00
check-stderr.sh [libc++] Harden tests against executors not running tests in a shell 2020-11-03 16:03:20 -05:00
check-stdout.sh [libc++] Harden tests against executors not running tests in a shell 2020-11-03 16:03:20 -05:00
init.pass.cpp [libc++] Add an option to disable wide character support in libc++ 2021-10-12 06:08:23 -04:00
lit.local.cfg [libc++] Add a libc++ configuration that does not support localization 2020-10-27 14:56:30 -04:00
send-stdin.sh [libc++] Harden tests against executors not running tests in a shell 2020-11-03 16:03:20 -05:00