From 9e0411bb7b2006ab988a1d7dc351086a482456a4 Mon Sep 17 00:00:00 2001 From: Milos Prchlik Date: Nov 24 2021 13:07:30 +0000 Subject: tests: use `adjust` to handle libcxx requirement in Fedora and RHEL --- diff --git a/tests/integration-test-suite/main.fmf b/tests/integration-test-suite/main.fmf index 7266071..1bebe3a 100644 --- a/tests/integration-test-suite/main.fmf +++ b/tests/integration-test-suite/main.fmf @@ -1,8 +1,6 @@ summary: Run the upstream LLVM integration test suite description: | Run the upstream LLVM integration test suite - - NOTE: don't forget to disable libcxx tests when libcxx is not available, by adding -DENABLE_LIBCXX=OFF. test: ./test.sh require: - cmake @@ -20,6 +18,13 @@ require: - libstdc++-static - clang-devel - python3-lit - - # Required in Fedora, but not shipped with RHEL. For future reference, comment the libcxx out as needed. - - libcxx-devel +adjust: + # libcxx shall be required in Fedora, it's not shipped with RHEL. + - require+: + - libcxx-devel + when: "distro == fedora" + because: testing against libcxx package in Fedora + - environment+: + CMAKE_CXXLIB: "-DENABLE_LIBCXX=OFF" + when: "distro == rhel" + because: libcxx is not shipped with RHEL diff --git a/tests/integration-test-suite/test.sh b/tests/integration-test-suite/test.sh index 682e4f0..45bfaf5 100755 --- a/tests/integration-test-suite/test.sh +++ b/tests/integration-test-suite/test.sh @@ -33,5 +33,5 @@ cd $(mktemp -d -p /var/tmp) git clone $repo_url cd llvm-toolchain-integration-test-suite mkdir _build && cd _build -cmake .. -GNinja +cmake .. -GNinja "${CMAKE_CXXLIB:-}" ninja $thread_args check