From 91a131aad31e19c12b2278e9bebc5b1ac0440255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 4 Mar 2026 10:20:10 +0100 Subject: [PATCH] Redefine tier0 testing As part of tier0 unification across the rhel-pt-gcc components (RHEL-113756), redefine tier0 testing. Replace the four existing tests (outdated and disconnected copies from the public part of tier1) with a pointer to the public part tier1 directly and use it whole, albeit on x86_64-only (this limitation is OSCI-imposed). For awareness, RHEL builds get full tier1 (including non-public tests and all the architectures) in a later phase of gating (BaseOS CI). This commit doesn't affect that in any way; we are just changing a small bit of functional testing sooner in the pipeline. --- plans/ci.fmf | 5 -- plans/tier0.fmf | 29 +++++++ tests/README | 2 - tests/Regression/identify/Makefile | 71 ---------------- tests/Regression/identify/PURPOSE | 3 - tests/Regression/identify/main.fmf | 21 ----- tests/Regression/identify/runtest.sh | 42 ---------- .../lto-preprocessor-options/Makefile | 64 -------------- .../lto-preprocessor-options/PURPOSE | 3 - .../lto-preprocessor-options/main.fmf | 15 ---- .../lto-preprocessor-options/runtest.sh | 41 --------- tests/Regression/testsuite/Makefile | 78 ----------------- tests/Regression/testsuite/PURPOSE | 3 - tests/Regression/testsuite/main.fmf | 27 ------ tests/Regression/testsuite/runtest.sh | 83 ------------------- tests/Sanity/smoke/Makefile | 59 ------------- tests/Sanity/smoke/PURPOSE | 3 - tests/Sanity/smoke/main.fmf | 15 ---- tests/Sanity/smoke/runtest.sh | 44 ---------- 19 files changed, 29 insertions(+), 579 deletions(-) delete mode 100644 plans/ci.fmf create mode 100644 plans/tier0.fmf delete mode 100644 tests/README delete mode 100644 tests/Regression/identify/Makefile delete mode 100644 tests/Regression/identify/PURPOSE delete mode 100644 tests/Regression/identify/main.fmf delete mode 100755 tests/Regression/identify/runtest.sh delete mode 100644 tests/Regression/lto-preprocessor-options/Makefile delete mode 100644 tests/Regression/lto-preprocessor-options/PURPOSE delete mode 100644 tests/Regression/lto-preprocessor-options/main.fmf delete mode 100755 tests/Regression/lto-preprocessor-options/runtest.sh delete mode 100644 tests/Regression/testsuite/Makefile delete mode 100644 tests/Regression/testsuite/PURPOSE delete mode 100644 tests/Regression/testsuite/main.fmf delete mode 100755 tests/Regression/testsuite/runtest.sh delete mode 100644 tests/Sanity/smoke/Makefile delete mode 100644 tests/Sanity/smoke/PURPOSE delete mode 100644 tests/Sanity/smoke/main.fmf delete mode 100755 tests/Sanity/smoke/runtest.sh diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index 3fd3ab7..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,5 +0,0 @@ -summary: CI Gating Plan -discover: - how: fmf -execute: - how: tmt diff --git a/plans/tier0.fmf b/plans/tier0.fmf new file mode 100644 index 0000000..addebdf --- /dev/null +++ b/plans/tier0.fmf @@ -0,0 +1,29 @@ +# Tier 0 test plan. It's actually Tier 1 +# - limited to its public part +# - executed on the architecture at hand +# When run by osci.tier0 on CentOS Stream or RHEL, it receives the following +# context: +# arch=x86_64 (the architecture at hand, currently OSCI uses just x86_64) +# distro=rhel. (even for CentOS Stream builds) +# trigger=build + +summary: Tier 0 test plan +discover: + - name: collect_info + how: shell + tests: + - name: /info/rpms + test: rpm -qa --last + - name: public_tests + how: fmf + url: https://gitlab.com/redhat/centos-stream/tests/annobin.git + filter: tier:1 +prepare: + - how: shell + script: + - dnf config-manager --set-enabled '*CRB*' || true + - dnf config-manager --set-enabled crb || true + - dnf config-manager --set-enabled rhel-buildroot || true + - dnf config-manager --set-enabled '*debuginfo*' || true +execute: + how: tmt diff --git a/tests/README b/tests/README deleted file mode 100644 index 9ad59d4..0000000 --- a/tests/README +++ /dev/null @@ -1,2 +0,0 @@ -The test's Makefiles are not used in Fedora CI infrastructure. But are kept here -for backward compatibility with traditional beakerlib test harness in RHEL. diff --git a/tests/Regression/identify/Makefile b/tests/Regression/identify/Makefile deleted file mode 100644 index f62f325..0000000 --- a/tests/Regression/identify/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/annobin/Regression/identify -# Description: identify -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/annobin/Regression/identify -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - -requires = annobin - -# https://mojo.redhat.com/docs/DOC-1072127 -dtsver = $(shell seq -s, 10 11) -dtsreq = $(shell echo {dev,gcc-}toolset-{$(dtsver)}{,-annocheck}) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Martin Cermak " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: identify" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 48h" >> $(METADATA) - @echo "RunFor: annobin" >> $(METADATA) - $(foreach package, $(requires) $(dtsreq), \ - echo "Requires: $(package)" >> $(METADATA); \ - ) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/identify/PURPOSE b/tests/Regression/identify/PURPOSE deleted file mode 100644 index 3471618..0000000 --- a/tests/Regression/identify/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/annobin/Regression/identify -Description: identify -Author: Martin Cermak diff --git a/tests/Regression/identify/main.fmf b/tests/Regression/identify/main.fmf deleted file mode 100644 index a10e87d..0000000 --- a/tests/Regression/identify/main.fmf +++ /dev/null @@ -1,21 +0,0 @@ -summary: identify -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -- devtoolset-10 -- devtoolset-10-annocheck -- devtoolset-11 -- devtoolset-11-annocheck -- gcc-toolset-10 -- gcc-toolset-10-annocheck -- gcc-toolset-11 -- gcc-toolset-11-annocheck -duration: 48h -extra-summary: /tools/annobin/Regression/identify -extra-task: /tools/annobin/Regression/identify diff --git a/tests/Regression/identify/runtest.sh b/tests/Regression/identify/runtest.sh deleted file mode 100755 index d1b3b5f..0000000 --- a/tests/Regression/identify/runtest.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/annobin/Regression/identify -# Description: identify -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="annobin" - -rlJournalStart - rlPhaseStartTest - rlRun "tool_v=$(annocheck --version | awk '/^annocheck: Version/ {print $3}')" - rlRun "__RPM=$(rpm --queryformat='%{name}\n' -qf $(man -w annobin))" - rlRun "rpm_v=$(rpm -q --queryformat='%{version}\n' $__RPM)" - # Following fails for annobin-8.89-2.el8 - rlRun "[[ "x${tool_v}" == "x${rpm_v}." ]]" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/lto-preprocessor-options/Makefile b/tests/Regression/lto-preprocessor-options/Makefile deleted file mode 100644 index 777e9de..0000000 --- a/tests/Regression/lto-preprocessor-options/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/annobin/Regression/lto-preprocessor-options -# Description: lto-preprocessor-options -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2020 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/annobin/Regression/lto-preprocessor-options -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Martin Cermak " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: lto-preprocessor-options" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 48h" >> $(METADATA) - @echo "RunFor: annobin" >> $(METADATA) - @echo "Requires: annobin annobin-annocheck redhat-rpm-config" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1743635" >> $(METADATA) - @echo "Releases: -RHEL4 -RHEL6 -RHEL7 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/lto-preprocessor-options/PURPOSE b/tests/Regression/lto-preprocessor-options/PURPOSE deleted file mode 100644 index c595c5e..0000000 --- a/tests/Regression/lto-preprocessor-options/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/annobin/Regression/lto-preprocessor-options -Description: lto-preprocessor-options -Author: Martin Cermak diff --git a/tests/Regression/lto-preprocessor-options/main.fmf b/tests/Regression/lto-preprocessor-options/main.fmf deleted file mode 100644 index e76679d..0000000 --- a/tests/Regression/lto-preprocessor-options/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: lto-preprocessor-options -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -- annobin-annocheck -- redhat-rpm-config -duration: 48h -extra-summary: /tools/annobin/Regression/lto-preprocessor-options -extra-task: /tools/annobin/Regression/lto-preprocessor-options diff --git a/tests/Regression/lto-preprocessor-options/runtest.sh b/tests/Regression/lto-preprocessor-options/runtest.sh deleted file mode 100755 index 315169d..0000000 --- a/tests/Regression/lto-preprocessor-options/runtest.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/annobin/Regression/lto-preprocessor-options -# Description: lto-preprocessor-options -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2020 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="annobin" - -rlJournalStart - rlPhaseStartTest - b=`mktemp` - rlRun "echo 'int main (void) { return 0; }' | gcc -xc -o $b `rpm --eval "%build_cflags %build_ldflags"` -flto - " - rlRun "annocheck -v $b" - rm $b - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Regression/testsuite/Makefile b/tests/Regression/testsuite/Makefile deleted file mode 100644 index 94a9500..0000000 --- a/tests/Regression/testsuite/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/annobin/Regression/testsuite -# Description: testsuite -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2018 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/annobin/Regression/testsuite -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - -requires = annobin binutils-devel gcc-c++ elfutils elfutils-devel make rpm-build \ -rpm-devel gcc-plugin-devel yum yum-utils bzip2-devel - -# https://mojo.redhat.com/docs/DOC-1072127 -dtsver = $(shell seq -s, 9 11) -dtsreq = $(shell echo {dev,gcc-}toolset-{$(dtsver)}-{build,elfutils{,-devel},gcc{,-c++,-plugin-devel},binutils{,-devel},annobin{,-annocheck}}) - - -installdeps: - yum -y install $(requires) - -showdeps: - echo $(requires) - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Martin Cermak " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: testsuite" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 48h" >> $(METADATA) - @echo "RunFor: annobin" >> $(METADATA) - $(foreach package, $(requires) $(dtsreq), \ - echo "Requires: $(package)" >> $(METADATA); \ - ) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/testsuite/PURPOSE b/tests/Regression/testsuite/PURPOSE deleted file mode 100644 index d639443..0000000 --- a/tests/Regression/testsuite/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/annobin/Regression/testsuite -Description: testsuite -Author: Martin Cermak diff --git a/tests/Regression/testsuite/main.fmf b/tests/Regression/testsuite/main.fmf deleted file mode 100644 index 78271da..0000000 --- a/tests/Regression/testsuite/main.fmf +++ /dev/null @@ -1,27 +0,0 @@ -summary: testsuite -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- annobin -- annobin-annocheck -- binutils-devel -- gcc -- gcc-c++ -- elfutils -- elfutils-devel -- make -- rpm-build -- rpm-devel -- gcc-plugin-devel -- yum -- dnf -- yum-utils -- bzip2-devel -duration: 48h -extra-summary: /tools/annobin/Regression/testsuite -extra-task: /tools/annobin/Regression/testsuite diff --git a/tests/Regression/testsuite/runtest.sh b/tests/Regression/testsuite/runtest.sh deleted file mode 100755 index 4a92cd9..0000000 --- a/tests/Regression/testsuite/runtest.sh +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/annobin/Regression/testsuite -# Description: testsuite -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2018 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="${PACKAGE:-$(rpm -qf --queryformat=%{name} $(man -w annobin))}" -export PACKAGE - -GCC="${GCC:-$(which gcc)}" - - -rlJournalStart - rlPhaseStartSetup - rlLogInfo "PACKAGES=$PACKAGES" - rlLogInfo "REQUIRES=$REQUIRES" - rlLogInfo "COLLECTIONS=$COLLECTIONS" - rlLogInfo "X_SCLS=$X_SCLS" - rlLogInfo "GCC=$GCC" - - # In case more than one devtoolset- or gcc-toolset -build package is - # installed (they can co-exist from the packaging persp, but their - # coexistence causes unexpected results with rpm macros), then we have - # a mess of defined rpm macros coming e.g. from - # /etc/rpm/macros.gcc-toolset-10-config - # /etc/rpm/macros.gcc-toolset-9-config etc. To have just the needed - # macros (respective to given SCL under test) defined without - # uninstalling unneeded RPMs, we'll need an override mechanism. The - # following assumes just one SCL *enabled* (more than one installed), - # and doesn't care of a (useless) revert: - echo ${X_SCLS} | fgrep toolset && \ - rlRun "cat /etc/rpm/*${X_SCLS%\ }* > ~/.rpmmacros" - - rlAssertRpm $PACKAGE - rlRun "TMP=\$(mktemp -d)" - rlRun "pushd $TMP" - - rlFetchSrcForInstalled $PACKAGE - rlRun "yum-builddep -y *src.rpm" - rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm" - rlRun "rpmbuild --define='_topdir $TMP' -bc SPECS/annobin.spec" - rlPhaseEnd - - rlPhaseStartTest - rlRun "pushd BUILD/annobin-*" - set -o pipefail - rlRun "make check |& tee $TMP/check.log" - rlRun -l "grep '^PASS:' $TMP/check.log" 0 - rlRun -l "grep '^FAIL:' $TMP/check.log" 1 - PASSCOUNT=$(grep '^PASS:' $TMP/check.log | wc -l) - rlRun "[[ $PASSCOUNT -ge 7 ]]" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TMP" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/Sanity/smoke/Makefile b/tests/Sanity/smoke/Makefile deleted file mode 100644 index 0ed8978..0000000 --- a/tests/Sanity/smoke/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/annobin/Sanity/smoke -# Description: smoke test for annobin plugin -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/annobin/Sanity/smoke -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Martin Cermak " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: smoke test for annobin plugin" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 48h" >> $(METADATA) - @echo "License: GPL" >> $(METADATA) - @echo "RunFor: annobin" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Sanity/smoke/PURPOSE b/tests/Sanity/smoke/PURPOSE deleted file mode 100644 index ad364a5..0000000 --- a/tests/Sanity/smoke/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/annobin/Sanity/smoke -Description: smoke test for annobin plugin -Author: Martin Cermak diff --git a/tests/Sanity/smoke/main.fmf b/tests/Sanity/smoke/main.fmf deleted file mode 100644 index 5c30808..0000000 --- a/tests/Sanity/smoke/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: smoke test for annobin plugin -description: '' -contact: -- Martin Cermak -component: -- annobin -test: ./runtest.sh -framework: beakerlib -recommend: -- man-db -- annobin -- annobin-annocheck -duration: 48h -extra-summary: /tools/annobin/Sanity/smoke -extra-task: /tools/annobin/Sanity/smoke diff --git a/tests/Sanity/smoke/runtest.sh b/tests/Sanity/smoke/runtest.sh deleted file mode 100755 index 0f39938..0000000 --- a/tests/Sanity/smoke/runtest.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/annobin/Sanity/smoke -# Description: smoke test for annobin plugin -# Author: Martin Cermak -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2019 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="annobin" - -rlJournalStart - rlPhaseStartSetup - rlRun "which gcc" - rlRun "man -w annobin" - rlRun "echo $X_SCLS" - rlPhaseEnd - - rlPhaseStartTest - rlRun "echo 'int main() {return 0;}' | gcc -xc -fplugin=annobin -o /dev/null -" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd