5 PROGNAME
="$(basename "${0}")"
9 ${PROGNAME} [-h|--help] [-b|--bootstrap] <build-directory> [lit options...] tests...
11 Shortcut to build the libc++ testing dependencies and run the libc++ tests with Lit.
13 [-b|--bootstrap] Configure tests to run against a bootstrap build of libcxx.
14 <build-directory> The path to the build directory to use for building the library.
15 [lit options...] Optional options to pass to 'llvm-lit'.
16 tests... Paths of the tests to run. Those paths are relative to '<monorepo-root>'.
20 $ cmake -S runtimes -B build/ -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi"
21 $ libcxx-lit build/ -sv libcxx/test/std/utilities/
26 if [[ "${1}" == "-h" ||
"${1}" == "--help" ]]; then
31 if [[ "${1}" == "-b" ||
"${1}" == "--bootstrap" ]]; then
36 if [[ $# -lt 1 ]]; then
44 if [[ "${type}" == "runtimes" ]]; then
45 echo "N.B.: In a bootstrap build, lit needs a prefix to work correctly;"
46 echo " See libcxx/docs/Testinglibcxx.rst for more information."
48 cmake
--build "${build_dir}" --target ${type}-test-depends
49 "${build_dir}/bin/llvm-lit" ${@}