Compare commits
No commits in common. "c8" and "c9s" have entirely different histories.
@ -1 +0,0 @@
|
||||
54956e8dfce9d977814449907acaeb26c50dd1cc SOURCES/annobin-11.13.tar.xz
|
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
SOURCES/annobin-11.13.tar.xz
|
||||
/annobin-*.tar.xz
|
||||
/annobin-9.51-1.fc34.src.rpm
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -rup annobin.orig/annocheck/annocheck.c annobin-11.12/annocheck/annocheck.c
|
||||
--- annobin.orig/annocheck/annocheck.c 2023-03-03 16:09:24.659603476 +0000
|
||||
+++ annobin-11.12/annocheck/annocheck.c 2023-03-03 16:09:57.249530355 +0000
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <elfutils/libdwelf.h>
|
||||
#include <elfutils/libdwfl.h>
|
||||
+#undef HAVE_LIBDEBUGINFOD
|
||||
+#define HAVE_LIBDEBUGINFOD 0
|
||||
#ifndef LIBANNOCHECK
|
||||
#include <rpm/rpmlib.h>
|
||||
#if HAVE_LIBDEBUGINFOD
|
@ -1,12 +0,0 @@
|
||||
diff -rup annobin.orig/gcc-plugin/annobin.cc annobin-10.64/gcc-plugin/annobin.cc
|
||||
--- annobin.orig/gcc-plugin/annobin.cc 2022-04-06 12:55:02.350469755 +0100
|
||||
+++ annobin-10.64/gcc-plugin/annobin.cc 2022-04-06 12:55:28.503296390 +0100
|
||||
@@ -1851,7 +1851,7 @@ annobin_emit_start_sym_and_version_note
|
||||
Ensure that we do not have empty special text sections so that the
|
||||
annobin start symbols are never beyond the end of the sections. */
|
||||
#ifndef ANNOBIN_NOP_INSN
|
||||
-#define ANNOBIN_NOP_INSN ".nop"
|
||||
+#define ANNOBIN_NOP_INSN "nop"
|
||||
#endif
|
||||
if (* suffix && enable_ppc64_nops)
|
||||
annobin_emit_asm (ANNOBIN_NOP_INSN,
|
36
annobin-strings-no-attach.patch
Normal file
36
annobin-strings-no-attach.patch
Normal file
@ -0,0 +1,36 @@
|
||||
--- annobin.orig/gcc-plugin/annobin.cc 2024-01-17 14:00:26.889983192 +0000
|
||||
+++ annobin-12.31/gcc-plugin/annobin.cc 2024-01-17 14:01:27.517055850 +0000
|
||||
@@ -3261,18 +3261,24 @@ plugin_init (struct plugin_name_args *
|
||||
target_start_sym_bias = annobin_target_start_symbol_bias ();
|
||||
if (annobin_attach_type == not_set)
|
||||
{
|
||||
- /* Choose a default attachment type. Link ordering is preferable
|
||||
- as it is more resistant to changes in compiler section building.
|
||||
- But it can only be used if the target assembler supports link_order sections
|
||||
- and the target linker is sufficiently new that it implements them correctly.
|
||||
- For now we use a test of the GCC version as an approximation to the binutils
|
||||
- versions that are needed. (Note - 2.35.2, as used by RHEL-9, is insufficient).
|
||||
- See BZ 2016458 for an example of where this solution is needed. */
|
||||
+ if (annobin_note_format == string)
|
||||
+ /* String format notes do not need section groups. */
|
||||
+ annobin_attach_type = none;
|
||||
+ else
|
||||
+ {
|
||||
+ /* Choose a default attachment type. Link ordering is preferable
|
||||
+ as it is more resistant to changes in compiler section building.
|
||||
+ But it can only be used if the target assembler supports link_order sections
|
||||
+ and the target linker is sufficiently new that it implements them correctly.
|
||||
+ For now we use a test of the GCC version as an approximation to the binutils
|
||||
+ versions that are needed. (Note - 2.35.2, as used by RHEL-9, is insufficient).
|
||||
+ See BZ 2016458 for an example of where this solution is needed. */
|
||||
#if GCCPLUGIN_VERSION_MAJOR >= 12
|
||||
- annobin_attach_type = link_order;
|
||||
+ annobin_attach_type = link_order;
|
||||
#else
|
||||
- annobin_attach_type = group;
|
||||
+ annobin_attach_type = group;
|
||||
#endif
|
||||
+ }
|
||||
}
|
||||
annobin_inform (INFORM_VERBOSE, "Attach mode: %s", attach_mode_name (annobin_attach_type));
|
||||
|
File diff suppressed because it is too large
Load Diff
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.rebuild.validation}
|
||||
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.other.functional}
|
5
plans/ci.fmf
Normal file
5
plans/ci.fmf
Normal file
@ -0,0 +1,5 @@
|
||||
summary: CI Gating Plan
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
4
rpminspect.yaml
Normal file
4
rpminspect.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
runpath:
|
||||
allowed_paths:
|
||||
- /usr/lib64
|
1
sources
Normal file
1
sources
Normal file
@ -0,0 +1 @@
|
||||
SHA512 (annobin-12.65.tar.xz) = ebe4736b4691e4d4846dfd0f0b1d417069a2fb7d6f1d176efb8bacd5f685b534e0045fb956fa656d3f41dda425f5140c81974b07ec22c9ccb1ae493122e42b2b
|
2
tests/README
Normal file
2
tests/README
Normal file
@ -0,0 +1,2 @@
|
||||
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.
|
71
tests/Regression/identify/Makefile
Normal file
71
tests/Regression/identify/Makefile
Normal file
@ -0,0 +1,71 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/annobin/Regression/identify
|
||||
# Description: identify
|
||||
# Author: Martin Cermak <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 <mcermak@redhat.com>" > $(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)
|
3
tests/Regression/identify/PURPOSE
Normal file
3
tests/Regression/identify/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/annobin/Regression/identify
|
||||
Description: identify
|
||||
Author: Martin Cermak <mcermak@redhat.com>
|
21
tests/Regression/identify/main.fmf
Normal file
21
tests/Regression/identify/main.fmf
Normal file
@ -0,0 +1,21 @@
|
||||
summary: identify
|
||||
description: ''
|
||||
contact:
|
||||
- Martin Cermak <mcermak@redhat.com>
|
||||
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
|
42
tests/Regression/identify/runtest.sh
Executable file
42
tests/Regression/identify/runtest.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/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 <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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
|
64
tests/Regression/lto-preprocessor-options/Makefile
Normal file
64
tests/Regression/lto-preprocessor-options/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/annobin/Regression/lto-preprocessor-options
|
||||
# Description: lto-preprocessor-options
|
||||
# Author: Martin Cermak <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 <mcermak@redhat.com>" > $(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)
|
3
tests/Regression/lto-preprocessor-options/PURPOSE
Normal file
3
tests/Regression/lto-preprocessor-options/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/annobin/Regression/lto-preprocessor-options
|
||||
Description: lto-preprocessor-options
|
||||
Author: Martin Cermak <mcermak@redhat.com>
|
15
tests/Regression/lto-preprocessor-options/main.fmf
Normal file
15
tests/Regression/lto-preprocessor-options/main.fmf
Normal file
@ -0,0 +1,15 @@
|
||||
summary: lto-preprocessor-options
|
||||
description: ''
|
||||
contact:
|
||||
- Martin Cermak <mcermak@redhat.com>
|
||||
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
|
41
tests/Regression/lto-preprocessor-options/runtest.sh
Executable file
41
tests/Regression/lto-preprocessor-options/runtest.sh
Executable file
@ -0,0 +1,41 @@
|
||||
#!/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 <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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
|
78
tests/Regression/testsuite/Makefile
Normal file
78
tests/Regression/testsuite/Makefile
Normal file
@ -0,0 +1,78 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/annobin/Regression/testsuite
|
||||
# Description: testsuite
|
||||
# Author: Martin Cermak <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 <mcermak@redhat.com>" > $(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)
|
3
tests/Regression/testsuite/PURPOSE
Normal file
3
tests/Regression/testsuite/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/annobin/Regression/testsuite
|
||||
Description: testsuite
|
||||
Author: Martin Cermak <mcermak@redhat.com>
|
27
tests/Regression/testsuite/main.fmf
Normal file
27
tests/Regression/testsuite/main.fmf
Normal file
@ -0,0 +1,27 @@
|
||||
summary: testsuite
|
||||
description: ''
|
||||
contact:
|
||||
- Martin Cermak <mcermak@redhat.com>
|
||||
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
|
83
tests/Regression/testsuite/runtest.sh
Executable file
83
tests/Regression/testsuite/runtest.sh
Executable file
@ -0,0 +1,83 @@
|
||||
#!/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 <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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
|
59
tests/Sanity/smoke/Makefile
Normal file
59
tests/Sanity/smoke/Makefile
Normal file
@ -0,0 +1,59 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /tools/annobin/Sanity/smoke
|
||||
# Description: smoke test for annobin plugin
|
||||
# Author: Martin Cermak <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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 <mcermak@redhat.com>" > $(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)
|
3
tests/Sanity/smoke/PURPOSE
Normal file
3
tests/Sanity/smoke/PURPOSE
Normal file
@ -0,0 +1,3 @@
|
||||
PURPOSE of /tools/annobin/Sanity/smoke
|
||||
Description: smoke test for annobin plugin
|
||||
Author: Martin Cermak <mcermak@redhat.com>
|
15
tests/Sanity/smoke/main.fmf
Normal file
15
tests/Sanity/smoke/main.fmf
Normal file
@ -0,0 +1,15 @@
|
||||
summary: smoke test for annobin plugin
|
||||
description: ''
|
||||
contact:
|
||||
- Martin Cermak <mcermak@redhat.com>
|
||||
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
|
44
tests/Sanity/smoke/runtest.sh
Executable file
44
tests/Sanity/smoke/runtest.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/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 <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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
|
Loading…
Reference in New Issue
Block a user