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

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 27 05:31:18 PDT 2021


mstorsjo added a comment.

In D89495#2717725 <https://reviews.llvm.org/D89495#2717725>, @mstorsjo wrote:

> Ok, so there's just one test still that fails on Windows in this configuration, libcxx/selftest/additional_compile_flags/substitutes-in-compile-flags.sh.cpp. I can try to have a look into what the issue is what that one.

Ok, so the reason here is that substitutes-in-compile-flags.sh.cpp greps for `%t` in various incarnations. If running with an internal shell, `%t` is expanded to a path with backslashes, and when that is passed to `grep`, those backslashes would have to be escaped. I don't think we'd be missing out on much by just adding `// UNSUPPORTED: windows` on that test, instead of trying to fiddle with backslash-escaping of paths for grep.

With that in place, the tests can be run without bash as executor. However there's a couple other tests that manually invoke the bash executable as part of the test too (which probably also would fail the same for embedded targets; the tests are libcxx/selftest/remote-substitutions.sh.cpp, std/input.output/iostream.objects/narrow.stream.objects/cin.sh.cpp and std/input.output/iostream.objects/wide.stream.objects/wcin.sh.cpp), and a couple dozen more that require generic unix-like tools like `cp` to exist. (The generic LLVM tests also require such unix tools like `cp` and `grep`, but also tries to locate a usable version of such tools automatically, cf https://github.com/llvm/llvm-project/blob/llvmorg-12.0.0/llvm/utils/lit/lit/llvm/config.py#L129-L156.)

That said, we're soon getting the CI images upgraded to always have bash available in PATH, but this patch probably is worthwhile anyway.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89495



More information about the libcxx-commits mailing list