diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..0f96d35 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,6 @@ +# Gating testplans for Clang + +The tests for clang are in a separate repo: https://src.fedoraproject.org/tests/clang +This directory should contain only fmf plans (such as build-gating.fmf) which import +the tests from the tests repo. This can be done using the "url" parameter of the +plan's "discover" step. Reference: https://tmt.readthedocs.io/en/stable/spec/plans.html#fmf \ No newline at end of file diff --git a/tests/build-gating-libomp.fmf b/tests/build-gating-libomp.fmf deleted file mode 100644 index 1ddd29e..0000000 --- a/tests/build-gating-libomp.fmf +++ /dev/null @@ -1,37 +0,0 @@ -summary: libomp clang tests for build/PR gating -adjust: - - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." - when: >- - trigger is defined - and trigger != commit - and trigger != build - enabled: false - - - because: "When testing SCL-ized LLVM, the collection must be enabled first" - environment+: - WITH_SCL: "scl enable llvm-toolset-13.0" - when: "collection == llvm-toolset-13.0" - - because: "When testing SCL-ized LLVM, the collection must be enabled first" - environment+: - WITH_SCL: "scl enable llvm-toolset-14.0" - when: "collection == llvm-toolset-14.0" - - - because: "libomp not supported in s390x" - when: arch == s390x - enabled: false - -discover: - how: fmf - test: libomp -execute: - how: tmt -prepare: - # We want to make sure libomp is not already present on the system to ensure - # that clang pulls in the correct libomp dependencies when it is installed. - - name: Drop libomp - how: shell - script: | - yum erase -y libomp libomp-devel clang clang-libs -provision: - hardware: - memory: ">= 4 GiB" diff --git a/tests/build-gating-pocl.fmf b/tests/build-gating-pocl.fmf index 4b74ced..6fda183 100644 --- a/tests/build-gating-pocl.fmf +++ b/tests/build-gating-pocl.fmf @@ -16,6 +16,8 @@ adjust: discover: how: fmf test: pocl + url: https://src.fedoraproject.org/tests/clang.git + ref: main execute: how: tmt prepare: diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf index b0b49be..ae4fdb3 100644 --- a/tests/build-gating.fmf +++ b/tests/build-gating.fmf @@ -50,11 +50,13 @@ adjust: discover: - name: clang-tests how: fmf + url: https://src.fedoraproject.org/tests/clang.git + ref: main filter: "tag:-not-in-default" - name: upstream-llvm-integration-testsuite how: fmf - url: https://src.fedoraproject.org/rpms/llvm.git - ref: rawhide + url: https://src.fedoraproject.org/tests/llvm.git + ref: main test: integration-test-suite execute: how: tmt diff --git a/tests/clang-format-diff/main.fmf b/tests/clang-format-diff/main.fmf deleted file mode 100644 index 06ed176..0000000 --- a/tests/clang-format-diff/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: clang-format-diff -test: "$WITH_SCL ./test.sh" -adjust: - # Common requirements when LLVM is not SCL-ized - - require: - - clang-tools-extra - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require: - - llvm-toolset-13.0-clang-tools-extra - when: "collection == llvm-toolset-13.0" - - require: - - llvm-toolset-14.0-clang-tools-extra - when: "collection == llvm-toolset-14.0" diff --git a/tests/clang-format-diff/test.sh b/tests/clang-format-diff/test.sh deleted file mode 100755 index d6fcb47..0000000 --- a/tests/clang-format-diff/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -eux - -# Check that clang-format-diff is in PATH. -# rhbz#1939018 -clang-format-diff -h diff --git a/tests/fedora-flags/hello.c b/tests/fedora-flags/hello.c deleted file mode 100644 index 51b259b..0000000 --- a/tests/fedora-flags/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - printf("Hello World\n"); -} diff --git a/tests/fedora-flags/hello.cpp b/tests/fedora-flags/hello.cpp deleted file mode 100644 index 400612b..0000000 --- a/tests/fedora-flags/hello.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include - -void hello() { - std::cout << "Hello World\n"; -} diff --git a/tests/fedora-flags/main.c b/tests/fedora-flags/main.c deleted file mode 100644 index 1a3455d..0000000 --- a/tests/fedora-flags/main.c +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/fedora-flags/main.cpp b/tests/fedora-flags/main.cpp deleted file mode 100644 index 1a3455d..0000000 --- a/tests/fedora-flags/main.cpp +++ /dev/null @@ -1,6 +0,0 @@ -void hello(); - -int main(int argc, char **argv) { - hello(); - return 0; -} diff --git a/tests/fedora-flags/main.fmf b/tests/fedora-flags/main.fmf deleted file mode 100644 index f2728ba..0000000 --- a/tests/fedora-flags/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: fedora-flags -test: "$WITH_SCL ./test.sh" -require: - - redhat-rpm-config -adjust: - - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" - - - because: s390x does not have epel repo which is required to provide rpm macros - enabled: false - when: >- - distro == rhel-7 - and arch == s390x - - # Note: this needs epel-release repo to be available - - because: "To enable rpm macros not available by default (e.g. build_cflags), epel-rpm-macros is needed" - require+: - - epel-rpm-macros - when: distro == rhel-7 diff --git a/tests/fedora-flags/test.sh b/tests/fedora-flags/test.sh deleted file mode 100755 index 75f674f..0000000 --- a/tests/fedora-flags/test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -eux - -set pipefail - -cflags=`rpm -D '%toolchain clang' -E %{build_cflags}` -cxxflags=`rpm -D '%toolchain clang' -E %{build_cxxflags}` -ldflags=`rpm -D '%toolchain clang' -E %{build_ldflags}` - - -# Test a c program -clang $cflags -c hello.c -o hello.o -clang $cflags -c main.c -o main.o -clang $ldflags -o hello main.o hello.o -./hello | grep "Hello World" - -# Test a cxx program -clang++ $cxxflags -c hello.cpp -o hello-cpp.o -clang++ $cxxflags -c main.cpp -o main-cpp.o -clang++ $ldflags -o hello-cpp main-cpp.o hello-cpp.o -./hello-cpp | grep "Hello World" diff --git a/tests/libomp/main.fmf b/tests/libomp/main.fmf deleted file mode 100644 index 960bccb..0000000 --- a/tests/libomp/main.fmf +++ /dev/null @@ -1,36 +0,0 @@ -# TODO: get fitting summary - what's the purpose of this test? Comment from the STI version says: -# -# We want to make sure libomp is not already present on the system to ensure -# that clang pulls in the correct libomp dependencies when it is installed. -summary: libomp tests -# This test requires a special preparation, see `/tests/tests-libomp` plan. As such, -# it shouldn't be part of the `/tests/default` plan. -tag: - - not-in-default -test: "$WITH_SCL ./test.sh" -adjust: - - because: "libomp is not supported in s390x" - when: arch == s390x - enabled: false - - # Common requirements when LLVM is not SCL-ized - - require: - - clang - - clang-libs - - libomp - - libomp-devel - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-clang-libs - - llvm-toolset-13.0-libomp - - llvm-toolset-13.0-libomp-devel - when: "collection == llvm-toolset-13.0" - - require: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-clang-libs - - llvm-toolset-14.0-libomp - - llvm-toolset-14.0-libomp-devel - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/libomp/openmp-compile-link-test.c b/tests/libomp/openmp-compile-link-test.c deleted file mode 100644 index a2b6004..0000000 --- a/tests/libomp/openmp-compile-link-test.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - int nthreads = omp_get_num_threads(); - printf("Num Threads: %d\n", nthreads); - return 0; -} diff --git a/tests/libomp/test.sh b/tests/libomp/test.sh deleted file mode 100755 index f07dbbc..0000000 --- a/tests/libomp/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -set -exo pipefail - -clang -fopenmp openmp-compile-link-test.c - -./a.out | grep "Num Threads: 1" diff --git a/tests/llvm-test-suite/main.fmf b/tests/llvm-test-suite/main.fmf deleted file mode 100644 index 7d61dfb..0000000 --- a/tests/llvm-test-suite/main.fmf +++ /dev/null @@ -1,18 +0,0 @@ -# TODO: once llvm-test-suite is converted to TMT, we can just link the test from plan. -summary: Run tests from llvm-test-suite package - -adjust: - - because: "llvm-test-suite is available for Fedora, not RHEL/CentOS" - when: >- - distro == rhel - or distro == centos - enabled: false - -test: "$WITH_SCL ./test.sh" - -require: - - git - - clang - - ninja-build - - llvm-test-suite -duration: 1h diff --git a/tests/llvm-test-suite/test.sh b/tests/llvm-test-suite/test.sh deleted file mode 100755 index 85418bc..0000000 --- a/tests/llvm-test-suite/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -# TODO: tmt does not support a remote git repo as a requirement, one has to clone it "manually". - -git clone --depth 1 https://src.fedoraproject.org/rpms/llvm-test-suite.git llvm-test-suite -cd llvm-test-suite/tests/test-suite -./runtest.sh diff --git a/tests/openmp-rpm/main.fmf b/tests/openmp-rpm/main.fmf deleted file mode 100644 index 2344193..0000000 --- a/tests/openmp-rpm/main.fmf +++ /dev/null @@ -1,30 +0,0 @@ -summary: Test build a simple RPM package to ensure that -fopenmp works -test: "$WITH_SCL ./runtest.sh" -require: - - rpm-build -adjust: - - because: "libomp not supported in s390x" - when: arch == s390x - enabled: false - - - because: "Use yum in RHEL < 8" - require+: - - yum-utils - environment+: - BUILDDEP_CMD: "yum-builddep" - when: distro < rhel-8 - - - because: "Use dnf in RHEL >= 8, Fedora and CentOS" - require+: - - dnf-plugins-core - environment+: - BUILDDEP_CMD: "dnf builddep" - when: distro >= rhel-8 or distro != rhel - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-build - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-build - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/openmp-rpm/runtest.sh b/tests/openmp-rpm/runtest.sh deleted file mode 100755 index 37647fe..0000000 --- a/tests/openmp-rpm/runtest.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -ex - -${BUILDDEP_CMD} -y test.spec -rpmbuild --define '_sourcedir .' --define '_builddir .' -bb test.spec diff --git a/tests/openmp-rpm/test.c b/tests/openmp-rpm/test.c deleted file mode 100644 index b20d164..0000000 --- a/tests/openmp-rpm/test.c +++ /dev/null @@ -1,7 +0,0 @@ -int main(int argc, char **argv) { - int res = 1; -#pragma omp parallel -#pragma omp single - res = 0; - return res; -} diff --git a/tests/openmp-rpm/test.spec b/tests/openmp-rpm/test.spec deleted file mode 100644 index e317a6a..0000000 --- a/tests/openmp-rpm/test.spec +++ /dev/null @@ -1,36 +0,0 @@ -%global toolchain clang -%{?scl:%global scl_prefix %{scl}-} - -Name: test -Version: 1 -Release: 1 -Summary: Test package for checking that RPM packages using -fopenmp build correctly -License: MIT - -BuildRequires: %{?scl_prefix}clang -BuildRequires: %{?scl_prefix}libomp - -Source0: test.c - -%description -clang was adding RUNPATH to binaries that use OpenMP, and since RUNPATH -is prohibited in Fedora builds, this was causing packages using clang -and OpenMP to fail to build. - -References: -https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild -https://github.com/llvm/llvm-project/commit/9b9d08111b618d74574ba03e5cc3d752ecc56f55 - -%build -clang ${CFLAGS} -c %{SOURCE0} -o test.o -clang ${LDFLAGS} -fopenmp test.o -o main - -%check -./main - -%install -install -d %{buildroot}%{_bindir} -install main %{buildroot}%{_bindir} - -%files -%{_bindir}/main diff --git a/tests/pocl/main.fmf b/tests/pocl/main.fmf deleted file mode 100644 index 1143416..0000000 --- a/tests/pocl/main.fmf +++ /dev/null @@ -1,24 +0,0 @@ -# TODO REVIEW: get fitting summary - what's the purpose of this test? Comment from the STI version says: -# -# This is separate from tests.yml because we want to run the tests without -# clang installed. -summary: pocl - -adjust: - - because: "PoCL is shipped with Fedora, not RHEL/CentOS" - when: >- - distro == rhel - or distro == centos - enabled: false - -# This test requires a special preparation, see `/tests/tests-pocl` plan. As such, -# it shouldn't be part of the `/tests/default` plan. -tag: - - not-in-default -# rhbz#1582884 -test: "$WITH_SCL ./test.sh" -require: - - git - - ocl-icd-devel - - pocl - - gcc diff --git a/tests/pocl/test.sh b/tests/pocl/test.sh deleted file mode 100755 index fd9f92b..0000000 --- a/tests/pocl/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -# TODO: tmt does not support a remote git repo as a requirement, one has to clone it "manually". - -git clone --depth 1 https://src.fedoraproject.org/rpms/pocl.git pocl -cd pocl/tests/simple-opencl-no-clang -./runtest.sh diff --git a/tests/ppc64le-long-double/main.fmf b/tests/ppc64le-long-double/main.fmf deleted file mode 100644 index 133c75a..0000000 --- a/tests/ppc64le-long-double/main.fmf +++ /dev/null @@ -1,33 +0,0 @@ -summary: Test that gcc and clang use the same long double format on ppc64le -test: $WITH_SCL ./runtest.sh -duration: 1h -# see https://bugzilla.redhat.com/show_bug.cgi?id=2115752 -enabled: false -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - - because: "Fedora CI runs in x86_64 only, emulate with qemu and mock" - require+: - - qemu-user-static - - mock - test: ./runtest-fedora.sh - when: distro == fedora and arch == x86_64 - continue: false - - - enabled: false - when: arch != ppc64le - - - require+: - - gcc - when: distro != fedora - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" diff --git a/tests/ppc64le-long-double/runtest-fedora.sh b/tests/ppc64le-long-double/runtest-fedora.sh deleted file mode 100755 index 25dbb9c..0000000 --- a/tests/ppc64le-long-double/runtest-fedora.sh +++ /dev/null @@ -1,14 +0,0 @@ -set -e - -fedora_release=`rpm -E %{fedora}` -mock_root=fedora-$fedora_release-ppc64le -triple=ppc64le-redhat-linux - -mock -r $mock_root --isolation=simple --install gcc -gcc_output=$(mock -r $mock_root --isolation=simple -q --shell gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) -clang_output=$(clang -target $triple -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) - -echo "gcc: $gcc_output" -echo "clang: $clang_output" - -test "$gcc_output" = "$clang_output" diff --git a/tests/ppc64le-long-double/runtest.sh b/tests/ppc64le-long-double/runtest.sh deleted file mode 100755 index 8061bd7..0000000 --- a/tests/ppc64le-long-double/runtest.sh +++ /dev/null @@ -1,9 +0,0 @@ -set -e - -gcc_output=$(gcc -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) -clang_output=$(clang -E -dM -x c /dev/null | grep -e __LONG_DOUBLE_IEEE128__ -e __LONG_DOUBLE_IBM128__) - -echo "gcc: $gcc_output" -echo "clang: $clang_output" - -test "$gcc_output" = "$clang_output" diff --git a/tests/rhbz_1647130/main.fmf b/tests/rhbz_1647130/main.fmf deleted file mode 100644 index 3445a1b..0000000 --- a/tests/rhbz_1647130/main.fmf +++ /dev/null @@ -1,19 +0,0 @@ -summary: RHBZ1647130 -test: "$WITH_SCL ./test.sh" -require: [] -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - clang-analyzer - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-clang-analyzer - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-clang-analyzer - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/rhbz_1647130/test.sh b/tests/rhbz_1647130/test.sh deleted file mode 100755 index 7fb47ba..0000000 --- a/tests/rhbz_1647130/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -eux - -tmp_cpp=`mktemp -t XXXXX.cpp` -tmp_dir=`mktemp -d` -echo 'int main(int argc, char*argv[]) { while(argc--) new int(); return 0; }' > $tmp_cpp -scan-build -o $tmp_dir clang++ -c $tmp_cpp -o /dev/null -(scan-view --no-browser $tmp_dir/* & WPID=$! && sleep 10s && kill $WPID) - diff --git a/tests/rhbz_1657544/from_chars.cpp b/tests/rhbz_1657544/from_chars.cpp deleted file mode 100644 index b76be22..0000000 --- a/tests/rhbz_1657544/from_chars.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include -#include -#include - -using namespace std; - -int main(int argc, char **argv) -{ - size_t r=0; - const char *begin = argv[1]; - const char *end = begin + strlen(begin); - from_chars(begin, end, r); - cout << r << '\n'; - return 0; -} diff --git a/tests/rhbz_1657544/main.fmf b/tests/rhbz_1657544/main.fmf deleted file mode 100644 index a775439..0000000 --- a/tests/rhbz_1657544/main.fmf +++ /dev/null @@ -1,16 +0,0 @@ -summary: RHBZ1657544 -test: "$WITH_SCL ./test.sh" -require: [] -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" diff --git a/tests/rhbz_1657544/test.sh b/tests/rhbz_1657544/test.sh deleted file mode 100755 index 58c088f..0000000 --- a/tests/rhbz_1657544/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -eux - -clang++ from_chars.cpp -./a.out 100 | grep 100 diff --git a/tests/rhbz_482491/main.fmf b/tests/rhbz_482491/main.fmf deleted file mode 100644 index f0929e9..0000000 --- a/tests/rhbz_482491/main.fmf +++ /dev/null @@ -1,17 +0,0 @@ -summary: rhbz-482491 -test: "$WITH_SCL ./test.sh" -require: - - libgcc -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - when: "collection == llvm-toolset-14.0" \ No newline at end of file diff --git a/tests/rhbz_482491/test.sh b/tests/rhbz_482491/test.sh deleted file mode 100755 index 2360238..0000000 --- a/tests/rhbz_482491/test.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -eux - -find /usr -name 'libgcc_s.so*' && echo "int main(){}" | clang -v -x c - diff --git a/tests/toolchains/hello.c b/tests/toolchains/hello.c deleted file mode 100644 index f5c80a9..0000000 --- a/tests/toolchains/hello.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main(int argc, char **argv) { - printf("Hello World\n"); - return 0; -} diff --git a/tests/toolchains/hello.cpp b/tests/toolchains/hello.cpp deleted file mode 100644 index bda4087..0000000 --- a/tests/toolchains/hello.cpp +++ /dev/null @@ -1,5 +0,0 @@ -#include -int main(int argc, char **argv) { - std::cout << "Hello World\n"; - return 0; -} diff --git a/tests/toolchains/main.fmf b/tests/toolchains/main.fmf deleted file mode 100644 index 9b8975b..0000000 --- a/tests/toolchains/main.fmf +++ /dev/null @@ -1,55 +0,0 @@ -# TODO REVIEW: better summary -summary: "" -test: "$WITH_SCL ./test.sh" -require: - - glibc-static - - yum-utils - # This require EPEL/CRB to be enabled on RHEL - - libstdc++-static -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - compiler-rt - - lld - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-compiler-rt - - llvm-toolset-13.0-lld - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-compiler-rt - - llvm-toolset-14.0-lld - when: "collection == llvm-toolset-14.0" - - # lld not supported in s390x or ppc64. If any lld package was added to - # requirements, remove it. - - require-: - - lld - - llvm-toolset-13.0-lld - - llvm-toolset-14.0-lld - when: arch == s390x or arch == ppc64 - - - environment+: - CXXLIBS: "libc++" - require+: - - libcxx-devel - - libcxx-static - when: "distro == fedora" - because: testing against libcxx package in Fedora - - - environment+: - CXXLIBS: "libstdc++" - require+: - - libstdc++ - when: >- - distro == rhel - or distro == centos - because: testing against libstdc++ package in RHEL as libcxx is not shipped with RHEL - -# TODO REVIEW: are these all requirements? test.sh seems to run quite a lot of stuff, looks like we -# need more packages from LLVM family. diff --git a/tests/toolchains/test.sh b/tests/toolchains/test.sh deleted file mode 100755 index 65594e6..0000000 --- a/tests/toolchains/test.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -eux - -set pipefail - -if [ -z "${CXXLIBS:-}" ]; then - echo "CXXLIBS variable is a required input but it's not specified!" - echo "Test metadata should have picked a proper value, depending on distro." - exit 1 -fi - -status=0 - -test_toolchain() { - - toolchain=$@ - args="" - - while [ $# -gt 0 ]; do - case $1 in - clang) - compiler=$1 - src=hello.c - ;; - clang++) - compiler=$1 - src=hello.cpp - ;; - compiler-rt) - args="$args -rtlib=$1" - ;; - libc++) - args="$args -stdlib=$1" - ;; - libstdc++) - args="$args -stdlib=$1" - ;; - lld) - args="$args -fuse-ld=$1" - ;; - *) - args="$args $1" - ;; - esac - shift - done - - cmd="$compiler $args $src" - rm -f a.out - echo "* $toolchain" - echo " command: $cmd" - if $cmd && ./a.out | grep -q 'Hello World'; then - echo " PASS" - else - echo " FAIL" - status=1 - fi -} - -clang --version -# Repoquery is needed instead yum info for compatibility with RHEL-7 -repoquery -i --installed $(rpm -qf $(which clang)) | grep ^Source -echo "" - -for compiler in clang clang++; do - for rtlib in "" compiler-rt; do - for linker in "" lld; do - for cxxlib in "" $CXXLIBS; do - if [ "$compiler" = "clang" -a -n "$cxxlib" ]; then - continue - fi - for args in "" -static; do - # Skip known failures - # TODO: Fix these - if [[ "$args" = "-static" && "$rtlib" = "compiler-rt" ]]; then - continue - fi - - # Static libc++ needs -pthread - if [[ "$args" = "-static" && "$cxxlib" = "libc++" ]]; then - args="$args -pthread" - fi - - # lld is not supported in s390x and ppc64 - if [[ "$(uname -m)" = "s390x" || "$(uname -m)" = "ppc64" ]] \ - && [[ "$linker" = "lld" ]]; - then - continue - fi - - # compiler-rt does not provide builtins for s390x - if [[ "$(uname -m)" = "s390x" && "$rtlib" = "compiler-rt" ]]; then - continue - fi - - test_toolchain $compiler $rtlib $linker $cxxlib $args - done - done - done - done -done - -exit $status diff --git a/tests/use-dwarf4-by-default/main.fmf b/tests/use-dwarf4-by-default/main.fmf deleted file mode 100644 index 3151d7e..0000000 --- a/tests/use-dwarf4-by-default/main.fmf +++ /dev/null @@ -1,20 +0,0 @@ -summary: Test that clang uses DWARFv4 by default -test: "$WITH_SCL ./test.sh" -require: - - libgcc -adjust: - # Common requirements when LLVM is not SCL-ized - - require+: - - clang - - llvm - when: "collection is not defined" - - # Requirements for SCL-ized LLVM - - require+: - - llvm-toolset-13.0-clang - - llvm-toolset-13.0-llvm - when: "collection == llvm-toolset-13.0" - - require+: - - llvm-toolset-14.0-clang - - llvm-toolset-14.0-llvm - when: "collection == llvm-toolset-14.0" diff --git a/tests/use-dwarf4-by-default/test.sh b/tests/use-dwarf4-by-default/test.sh deleted file mode 100755 index 5da8196..0000000 --- a/tests/use-dwarf4-by-default/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -eux - -echo "int main(){ return 0; }" | clang -g -v -x c - 2> build.log -# Make sure that clang is using the expected flag to use DWARF 4 -grep -q "\-dwarf-version=4" build.log -# Inspect the binary to double check expected DWARF version -llvm-dwarfdump a.out | grep -i version | grep 0x0004