From b21766edbc4e86978669b4fdd47226a2d9e457b9 Mon Sep 17 00:00:00 2001 From: Milos Prchlik Date: Sep 13 2021 21:56:17 +0000 Subject: Cleanup of tests for easier future sync to downstream repos * tests.yml => tests-llvm.yml, to allow composition by "dumping" tests from several LLVM components when testing a module or collection; * more comments, to highlight part where downstream maintaners and QEs need to modify tests; * fixed failing tests to get a clean table as a verification tests do work after my changes. --- diff --git a/tests/tests-llvm.yml b/tests/tests-llvm.yml new file mode 100644 index 0000000..3afd361 --- /dev/null +++ b/tests/tests-llvm.yml @@ -0,0 +1,73 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + # Required for rust and possibly other dependant packages + # + # NOTE #1: drop the requirement once the transitional period between releases is gone + # and llvm-compat is no longer a) needed, and b) part of the build. + # + # NOTE #2: keep it the first requirement. Depending on the order of requirements, placing it somewhere + # else in the list may lead to harness uninstalling and re-installing LLVM packages. That a) would be + # a waste of time, b) could potentially hide issues, leading to testing unexpected NVRs. + # + # - llvm-compat + + - rust + - cargo + + # the requirements below are for the integration suite + - binutils + - cmake + - llvm-devel + - clang + - clang-analyzer + - clang-tools-extra + - compiler-rt + - ninja-build + - libomp-devel + - lld + - lldb + - git + - make + - libstdc++-static + - clang-devel + + # In Fedora, python-lit is valid. In RHEL, however, the actual package is python3-lit. + - python-lit + # - python3-lit + + # Required in Fedora, but not shipped with RHEL. For future reference, comment the libcxx out as needed. + - libcxx-devel + + tests: + - rust-sanity: + dir: ./ + run: cargo new hello && cd hello && cargo run + # There is a bug in the build process when it runs out of disk space + # while stripping binaries, which causes the strip to fail, but does + # not fail the build. This results in a libLLVM.so that is over 2GB + # which breaks the nightly compose. So this test checks that libLLVM.so + # is less than 100MB to ensure it was successfully stripped. + # https://bugzilla.redhat.com/show_bug.cgi?id=1793250 + - libllvm-size: + dir: ./ + run: test `stat -L -c %s /usr/lib64/libLLVM.so` -lt 104857600 + # This test ensures that the spec file still builds correctly with + # %global compat_build 1 + # FIXME: This fails, because the CI system has a hard-coded timeout of 4 + # hours. + #- build-compat + - binutils-plugin-ar + # make sure llvm-config symlink is properly setup + - llvm-config: + dir: ./ + run: llvm-config --version + # make sure versioned llvm-config symlink is properly setup + - versioned-llvm-config: + dir: ./ + run: llvm-config-13 --version + # NOTE: don't forget to disable libcxx tests when libcxx is not available, by adding -DENABLE_LIBCXX=OFF. + - integration-test-suite diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 3cde089..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,54 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - rust - - cargo - - binutils - # the requirements below are for the integration suite - - cmake - - llvm-devel - - clang - - clang-analyzer - - clang-tools-extra - - compiler-rt - - ninja-build - - libcxx-devel - - libomp-devel - - python-lit - - lld - - lldb - - git - - make - - libstdc++-static - - clang-devel - tests: - - rust-sanity: - dir: ./ - run: cargo new hello && cd hello && cargo run - # There is a bug in the build process when it runs out of disk space - # while stripping binaries, which causes the strip to fail, but does - # not fail the build. This results in a libLLVM.so that is over 2GB - # which breaks the nightly compose. So this test checks that libLLVM.so - # is less than 100MB to ensure it was successfully stripped. - # https://bugzilla.redhat.com/show_bug.cgi?id=1793250 - - libllvm-size: - dir: ./ - run: test `stat -L -c %s /usr/lib64/libLLVM.so` -lt 100000000 - # This test ensures that the spec file still builds correctly with - # %global compat_build 1 - # FIXME: This fails, because the CI system has a hard-coded timeout of 4 - # hours. - #- build-compat - - binutils-plugin-ar - # make sure llvm-config symlink is properly setup - - llvm-config: - dir: ./ - run: llvm-config --version - # make sure versionned llvm-config symlink is properly setup - - versionned-llvm-config: - dir: ./ - run: llvm-config-12 --version - - integration-test-suite