Commit graph

67 commits

Author SHA1 Message Date
Nikita Popov
3de6a2aad5 Update ucrt test for new file output
After a recent file update, the output is now:

> a.exe: PE32+ executable for MS Windows 5.02 (console), x86-64, 18 sections

Adjust the grep to match both the old and new output. I think the
key parts are that it's a "PE32+ executable" for x86-64.
2025-02-06 10:09:24 +01:00
Tulio Magno Quites Machado Filho
c140bdf103 rhbz_1647130: Remove tmp_dir at the end
Guarantee the temporary directory is removed after the execution of this
test.
2024-11-13 16:30:58 -03:00
Jesus Checa Hidalgo
cda9761d2e Shell static analysis
Add pre-commit hook for static analysis on shell scripts (shellcheck)
Fixed lots of issues flagged by shellcheck.
2024-08-05 09:15:19 +02:00
Jesus Checa Hidalgo
71a2b1c3bf Refactor kernel-ark build test for caching and git clone retry
This commit mitigates test failures due to git unreliability and
improves test time over test reruns using cached SRPMs.
- Added CACHE_DIR_BASE, KERNEL_SRPM_PATTERN and KERNEL SRPM variables.
- Implemented checkCache() to look for an existing SRPM in the cache and
  install its build dependencies.
- Implemented cloneKernelTree() for cloning the kernel-ark repo with
  retries.
- Implemented generateSRPM() to handle all operations required to generate
  an SRPM and cache it.
- Updated main test phase to utilize caching and SRPM generation
  functions.
2024-07-23 10:01:02 +00:00
Timm Bäder
bf7e2faa36 Enable pie-rpm test by default 2024-07-19 07:28:13 +00:00
Jesus Checa Hidalgo
9080b2716a Update test relevancy for compat packages
llvm-test-suite and rpmmacros tests disabled for compat packages
2024-07-17 12:55:17 +02:00
Konrad Kleine
07526ca7fa For snapshots on RHEL we want to check for DWARF5 2024-07-03 16:44:21 +02:00
Jesus Checa Hidalgo
2b2e06a7e1 use-correct-dwarf-default: Update test
* The default version is now 5. If clang version is older than 18 then
  fall back to version 4.
* Added optional env var to overwrite required dwarf version.
* Updated fmf metadata to use dwarf4 in distros that don't support v5
* Fedora 38 is EOL, removed dead code.
2024-06-10 11:46:06 +02:00
Jesus Checa Hidalgo
06436d11ba Revert "use-correct-dwarf-default: Update test"
This reverts commit dade06cfdd.
2024-06-10 11:44:30 +02:00
Jesus Checa Hidalgo
dade06cfdd use-correct-dwarf-default: Update test
* The default version is now 5. If clang version is older than 18 then
  fall back to version 4.
* Added optional env var to overwrite required dwarf version.
* Updated fmf metadata to use dwarf4 in distros that don't support v5
* Fedora 38 is EOL, removed dead code.
2024-06-10 11:39:04 +02:00
Nikita Popov
5100dc7cf0 Perform llvm-snapshot adjustment for rhel as well
We need to install lld for snapshots on rhel as well.
2024-06-07 09:08:12 +02:00
Jesus Checa Hidalgo
3359782211 toolchains: ensure that tmt requires lld when testing snapshots 2024-06-06 08:30:12 +02:00
Jesus Checa Hidalgo
7ab65858ab toolchains: Set lld package for rhel 8.10 modules
llvm-toolset module is being updated to 18 in rhel 8.10 and we
need to test newly added lld there. Set it as recommend for now
as we still have LLVM 17 in default rhel8 stream
2024-05-31 06:48:35 +00:00
Panu Matilainen
e5e8b03b9f Add missing glibc-static build dependency to pie-rpm test 2024-05-31 06:10:54 +00:00
Panu Matilainen
ca2401025f Make the pie-rpm test spec self-contained and work with any rpm version
Move the dummy source inline to %prep and checks from runtest.sh into
%check, to take advantage of rpm facilities instead of fighting them,
and now we can just run this anywhere at all without any cumbersome
override defines and any rpm version.
2024-05-31 06:10:54 +00:00
Jesus Checa Hidalgo
f741479086 openmp-rpm: make the test compatible with rpm 4.20+ 2024-05-30 15:14:40 +02:00
Jesus Checa Hidalgo
af1c69a51d kernel-ark-build: Improve logging and fix disable updates-testing repo
dnf5 is the default pkg manager in rawhide and config-manager command
has different interface. Falling back to dnf-3.
Added lld and llvm-devel as explicit requirements in test metadata
Added extra logging of which packages (NVRs) where installed by tmt
and the amount of cpus and memory the running system has.
2024-05-23 09:03:19 +02:00
Jesus Checa Hidalgo
3d9db8ae35 Create kernel-ark rebuild test
This commit adds a new test that rebuilds kernel-ark with clang to
ensure that we do not break the upstream builds. This is a squashed
commit of the following:

PoC for kernel-ark build test and plan

kernel-ark: create virtual test and run all build configurations

Created configurations for lto/non-lto and base/debug, adding proper
relevancies. Test script parametrized with environment variables so it
can be reused by all these configs.

Fix relevancy for debug/non-lto build

Fix dependency install logic

Final cleanups

Make kernel-ark-build plan to be run only if triggered manually

Rename kernel-ark plan to avoid naming confusions with the test

Add documentation for kernel-ark test
2024-05-09 16:59:21 +02:00
Konrad Kleine
5e5ec12425 Add pre-commit config and update README
See also https://src.fedoraproject.org/tests/llvm/pull-request/27
2024-05-03 14:52:18 +02:00
Jesus Checa Hidalgo
3449426c91 Remove redundant clang requires 2024-04-25 14:25:59 +00:00
Jesus Checa Hidalgo
0297643810 remove hardcoded clang package when calling rpm command
Use the clang command to locate the correct clang package name
instead of hardcoding "clang" in the test. This is needed for the
test to work with compat packages which are named differently.
2024-04-25 14:25:59 +00:00
Jesus Checa Hidalgo
0f16004a0a openmp-rpm: Do not run dnf builddep
tmt should take care of any dependencies required by the test.
Letting the test call dnf and install packages can break the environment
and cause invalid results in subsequent tests, specially when testing
compat packages.
2024-04-25 14:25:59 +00:00
Jesus Checa Hidalgo
b3c624504c libomp: remove hardcoded clang package
Query the clang nvr checking which package provides the clang binary
instead querying directly for "clang" package. Add also support for
running  the test with compat packages (clang17, clang16)
2024-04-25 14:25:59 +00:00
Timm Bäder
84b1265f72 Add more pie-rpm tests
Make sure we also get the expected behavior when _pre_pending additional
flags to $LDFLAGS
2024-04-23 11:19:34 +00:00
Jesus Checa Hidalgo
487364d65b Fix wrong relevancy for libomp tests
libomp is supported in s390x only in Fedora, and if LLVM is 18 or newer
For libomp installed from fedora repos this means Fedora >= 40, for
LLVM snapshots it's enabled always.
2024-04-16 05:47:58 +00:00
Tulio Magno Quites Machado Filho
020d712305 Run ppc64le-long-double natively on snapshot executions
Snapshot builds are able to test natively on ppc64le despite using
Fedora. This restriction only exists when running Bodhi tests.
So, let ppc64le-long-double use the same test script as RHEL.
2024-04-15 13:02:50 -03:00
Tulio Magno Quites Machado Filho
f58e59b394 Temporarily tag pie-rpm as not-in-default
Filter out this test until redhat-rpm-config gets its side of the update.
Otherwise, this will cause failures when building clang on Fedora and
when running the daily snapshots.
2024-04-04 14:44:39 -03:00
Timm Bäder
0d4c50b5e0 Add test to check -pie works. 2024-04-02 14:45:23 +02:00
Jesus Checa Hidalgo
2b4086412b fix readme formatting 2024-04-02 08:31:19 +02:00
Jesus Checa Hidalgo
acbe4aee52 Add documentation to README.md 2024-03-07 16:41:38 +01:00
Jesus Checa Hidalgo
23bd2ee6b2 Add libomp component metadata to relevant tests 2024-03-07 13:29:07 +01:00
Jesus Checa Hidalgo
defae03611 Update s390x adjustments for LLVM 18
Adjust tests to reflect libomp and lld support for s390x
libomp and openmp-rpm tests need to be run in s390x for LLVM>=18
toolchains test needs to install lld package and run lld commands
2024-03-07 10:41:28 +01:00
Jesus Checa Hidalgo
77be13cc41 Update build-gating plan
Collection adjustments no longer needed.
Setup CRB in RHEL to take care of AWS/Beaker repo naming.
Add discover setup for llvm-test-suite
2024-02-29 18:13:48 +01:00
Jesus Checa Hidalgo
598eead7e1 Gather common metadata under a parent main.fmf
Metadata common to all tests include component, contact, framework,
test script and frequent required packages.
Normalized script names to 'runtest.sh'.
2024-02-29 18:13:35 +01:00
Jesus Checa Hidalgo
9c62e92982 Move all tests to a sudbirectory 2024-02-27 12:09:20 +01:00
Konrad Kleine
ca5c810d9a Use correct DWARF version
Instead of checking for DWARF4 only we now check for DWARF5 if clang is greater or equal to version 18.  Only if Fedora is less than 38 we fall back to require DWARF4.

The grep in the output of `llvm-dwarfdump` could potentially match other hex numbers and now only matches the version.
2024-02-05 20:24:09 +01:00
Tulio Magno Quites Machado Filho
bb6d566ab8 ppc64le-long-double: Improve warnings when mock is not supported
Stop printing messages from the test that runs mock as they refer to
errors, causing confusion.
Send all these messages to /dev/null and print our own message saying
the test will be ignored.
2023-10-27 08:41:02 -03:00
Jesus Checa Hidalgo
982bb6f065 toolchains test: add support for snapshots testing 2023-10-25 12:16:01 +02:00
Tulio Magno Quites Machado Filho
0e8ca2a543 Add a test that checks if debug information is disabled by default
In a recent change to clang 17.0.0, debug information got enabled by
default by mistake.
Add a test that helps to prevent that.
2023-09-20 10:57:52 -03:00
Tulio Magno Quites Machado Filho
c9cf4400a6 Remove reference to %{clang_resource_dir_readonly}
This macro has been removed in LLVM 17.0.0.
2023-08-09 16:07:41 -03:00
Tulio Magno Quites Machado Filho
f37486b615 Ignore RC suffixes in the version string
Considering the macro variables do not have the ~rcN suffix, the rpm
version must be cleaned before it's used as input to validate the
correct value in the macro version.
2023-08-09 16:05:55 -03:00
Jesus Checa Hidalgo
3ff5b7451d openmp-rpm: adjustments for fedora 39 (dnf5) 2023-07-12 18:51:33 +02:00
Jesus Checa Hidalgo
1e0115c194 gcc-clang-compatibility: Add support for gcc-toolset installations
clang may use a gcc from gcc-toolset instead the system version. In that
case we need to test the compatibility with that one, not with the
system based gcc.
2023-07-03 14:33:38 +02:00
Jesus Checa Hidalgo
5a8ea6a930 ppc64le-long-double: Adjust distro relevancy 2023-05-11 18:28:00 +02:00
Tulio Magno Quites Machado Filho
5ac66c3693 Add a new test that validates the RPM macros
This new test checks if Clang's RPM macros are:
1. Installed.
2. Have correct values.
3. Point to existing directories.
2023-04-14 12:10:40 -03:00
Tulio Magno Quites Machado Filho
6a33abfde8 Install dnf-config-manager before using it
The container image centos:stream9 does not come with
'dnf config-manager' preinstalled, forcing us to install it first.
2023-04-14 12:04:30 -03:00
Tulio Magno Quites Machado Filho
22639249c6 Remove pocl-related tests
pocl has been FTBFS since Fedora 38. There is a plan to orphan it.
2023-04-04 14:43:52 -03:00
Jesus Checa Hidalgo
de1d86b24b rhbz_482491: Fix missing gcc-x86_64-linux-gnu dependency in Fedora 2023-01-24 10:44:06 +01:00
Nikita Popov
048eb66cf0 Add test for ucrt64 toolchain detection on fedora 2022-12-21 11:04:24 +01:00
Jesus Checa Hidalgo
5a94d66325 libomp: query for host arch clang/libomp to avoid false positives if multilib packages are installed 2022-12-20 11:06:13 +01:00