Migrate tests to tests/lld repo
This commit is contained in:
parent
53099ce734
commit
efe895c2da
6
tests/README.md
Normal file
6
tests/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Gating testplans for lld
|
||||
|
||||
The tests for lld are in a separate repo: https://src.fedoraproject.org/tests/lld
|
||||
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
|
@ -1,23 +0,0 @@
|
||||
summary: Test lld with clang
|
||||
test: "$WITH_SCL ./test.sh"
|
||||
require: []
|
||||
adjust:
|
||||
- because: lld is not shipped for s390x and ppc64
|
||||
enabled: false
|
||||
when: arch == s390x or arch == ppc64
|
||||
|
||||
# Common requirements when LLVM is not SCL-ized
|
||||
- require+:
|
||||
- clang
|
||||
- lld
|
||||
when: "collection is not defined"
|
||||
|
||||
# Requirements for SCL-ized LLVM
|
||||
- require+:
|
||||
- llvm-toolset-13.0-clang
|
||||
- llvm-toolset-13.0-lld
|
||||
when: "collection == llvm-toolset-13.0"
|
||||
- require+:
|
||||
- llvm-toolset-14.0-clang
|
||||
- llvm-toolset-14.0-lld
|
||||
when: "collection == llvm-toolset-14.0"
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
echo "int main(){ return 0; }" | clang -x c -fuse-ld=lld -
|
@ -35,6 +35,8 @@ adjust:
|
||||
discover:
|
||||
- name: lld-tests
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/lld.git
|
||||
ref: main
|
||||
test: ld-alternative
|
||||
execute:
|
||||
how: tmt
|
||||
|
@ -35,11 +35,13 @@ adjust:
|
||||
discover:
|
||||
- name: lld-tests
|
||||
how: fmf
|
||||
url: https://src.fedoraproject.org/tests/lld.git
|
||||
ref: main
|
||||
filter: "tag:-spoils-installation"
|
||||
- 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
|
||||
|
@ -1,25 +0,0 @@
|
||||
summary: Test lld with gcc
|
||||
test: "$WITH_SCL ./test.sh"
|
||||
require:
|
||||
- gcc
|
||||
adjust:
|
||||
- because: lld is not shipped for s390x and ppc64
|
||||
enabled: false
|
||||
when: arch == s390x or arch == ppc64
|
||||
|
||||
- because: system gcc is too old in rhel-7
|
||||
enabled: false
|
||||
when: distro <= rhel-7
|
||||
|
||||
# Common requirements when LLVM is not SCL-ized
|
||||
- require+:
|
||||
- lld
|
||||
when: "collection is not defined"
|
||||
|
||||
# Requirements for SCL-ized LLVM
|
||||
- require+:
|
||||
- llvm-toolset-13.0-lld
|
||||
when: "collection == llvm-toolset-13.0"
|
||||
- require+:
|
||||
- llvm-toolset-14.0-lld
|
||||
when: "collection == llvm-toolset-14.0"
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
echo "int main(){ return 0; }" | gcc -x c -fuse-ld=lld -
|
@ -1,28 +0,0 @@
|
||||
summary: Test linker switching with alternatives
|
||||
test: "$WITH_SCL ./test.sh"
|
||||
# This test spoils the installation by removing lld, therefore it should be marked as such.
|
||||
tag:
|
||||
- spoils-installation
|
||||
require:
|
||||
- binutils
|
||||
adjust:
|
||||
- because: lld is not shipped for s390x and ppc64
|
||||
enabled: false
|
||||
when: arch == s390x or arch == ppc64
|
||||
|
||||
- because: lld is not installed as ld alternative in rhel < 9
|
||||
enabled: false
|
||||
when: distro < rhel-9
|
||||
|
||||
# Common requirements when LLVM is not SCL-ized
|
||||
- require+:
|
||||
- lld
|
||||
when: "collection is not defined"
|
||||
|
||||
# Requirements for SCL-ized LLVM
|
||||
- require+:
|
||||
- llvm-toolset-13.0-lld
|
||||
when: "collection == llvm-toolset-13.0"
|
||||
- require+:
|
||||
- llvm-toolset-14.0-lld
|
||||
when: "collection == llvm-toolset-14.0"
|
@ -1,30 +0,0 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
# This test assumes lld is already installed.
|
||||
|
||||
function verify_ld_bfd {
|
||||
|
||||
# Verify that /usr/bin/ld points to ld.bfd.
|
||||
ls -l /etc/alternatives/ld | grep ld.bfd
|
||||
|
||||
# Run ld and verify it invokes ld.bfd
|
||||
/usr/bin/ld --version | grep 'GNU ld'
|
||||
}
|
||||
|
||||
|
||||
# Verify ld.bfd is still the system linker when lld is installed
|
||||
verify_ld_bfd
|
||||
|
||||
# Set lld as the system linker
|
||||
update-alternatives --set ld /usr/bin/ld.lld
|
||||
|
||||
# Verify that /usr/bin/ld points to lld
|
||||
ls -l /etc/alternatives/ld | grep ld.lld
|
||||
|
||||
# Run ld and verify it invokes lld
|
||||
/usr/bin/ld --version | grep 'LLD'
|
||||
|
||||
# Uninstall lld and make sure the /usr/bin/ld is reset to ld.bfd
|
||||
dnf -y remove --noautoremove lld
|
||||
|
||||
verify_ld_bfd
|
Loading…
Reference in New Issue
Block a user