public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/scap-security-guide] rawhide: replace Contest /static-checks/rpmbuild-ctest with simple ctest
@ 2026-09-17 11:33 Jiri Jaburek
0 siblings, 0 replies; only message in thread
From: Jiri Jaburek @ 2026-09-17 11:33 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/scap-security-guide
Branch : rawhide
Commit : 87d1c82f297842b753c2f5335192df4fe256f951
Author : Jiri Jaburek <comps@nomail.dom>
Date : 2026-09-15T15:16:59+02:00
Stats : +41/-5 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/scap-security-guide/c/87d1c82f297842b753c2f5335192df4fe256f951?branch=rawhide
Log:
replace Contest /static-checks/rpmbuild-ctest with simple ctest
Contest is not compatible with Fedora, so this simply re-writes
the Contest test into a simple standalone bash script.
Arguably, this implementation is better because it uses 'rpmbuild'
to compile the SRPM, rather than doing 'cmake' on the extracted
source tarball.
Signed-off-by: Jiri Jaburek <comps@nomail.dom>
---
diff --git a/plans/ci.fmf b/plans/ci.fmf
index bae8765..bc9ff0e 100644
--- a/plans/ci.fmf
+++ b/plans/ci.fmf
@@ -1,8 +1,5 @@
summary: CI test plan
discover:
- how: fmf
- url: https://github.com/RHSecurityCompliance/contest
- test:
- - /static-checks/rpmbuild-ctest
+ how: fmf
execute:
- how: tmt
+ how: tmt
diff --git a/tests/ctest/main.fmf b/tests/ctest/main.fmf
new file mode 100644
index 0000000..787173d
--- /dev/null
+++ b/tests/ctest/main.fmf
@@ -0,0 +1,7 @@
+summary: Builds scap-security-guide source and runs ctest on it
+require:
+ - dnf-plugins-core
+ - rpm-build
+ - ansible-core
+duration: 4h
+test: ./test.sh
diff --git a/tests/ctest/test.sh b/tests/ctest/test.sh
new file mode 100755
index 0000000..060c2de
--- /dev/null
+++ b/tests/ctest/test.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+set -x -e
+
+ansible-galaxy -vvv collection install ansible.posix community.general
+
+tmpdir=$(mktemp -d -p /var/tmp)
+trap "rm -rf \"$tmpdir\"" EXIT
+cd "$tmpdir"
+
+dnf download --source scap-security-guide
+
+rpm -ivh --define "_topdir $tmpdir" *.src.rpm
+dnf -y builddep SPECS/scap-security-guide.spec
+rpmbuild --define "_topdir $tmpdir" -bc SPECS/scap-security-guide.spec
+
+# the BUILD rpmbuild-created directory may contain any wild number
+# of subdirectories or scap-security-guide-* suffixes, being inconsistent
+# across RHEL and Fedora versions; just try to find the actual real 'build'
+# directory inside the real source tree that was built
+#
+# for example Fedora has:
+# BUILD/scap-security-guide-0.1.82-build/scap-security-guide-0.1.82/build
+# and RHEL has:
+# BUILD/scap-security-guide-0.1.82/build
+# BUILD/scap-security-guide-0.1.82-SPECPARTS <-- bogus/ignored
+#
+build_ctestfile=$(find BUILD/ | grep build/CTestTestfile.cmake | head -1)
+build_dir=${build_ctestfile%/*}
+
+cd "$build_dir"
+ctest --output-on-failure
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-17 11:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 11:33 [rpms/scap-security-guide] rawhide: replace Contest /static-checks/rpmbuild-ctest with simple ctest Jiri Jaburek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox