Import RHEL's regression test for #850832

This commit is contained in:
Václav Kadlčík 2021-04-28 13:38:57 +02:00
parent 5368a04b59
commit 6becef8c86
4 changed files with 146 additions and 0 deletions

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual
# Description: Test for BZ#850832 (The binutils package contains the windmc(1) manual)
# Author: Milos Prchlik <mprchlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual
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: Milos Prchlik <mprchlik@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#850832 (The binutils package contains the windmc(1) manual)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: binutils" >> $(METADATA)
@echo "Requires: binutils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: yes" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 850832" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual
Description: Test for BZ#850832 (The binutils package contains the windmc(1) manual)
Author: Milos Prchlik <mprchlik@redhat.com>
Bug summary: The binutils package contains the windmc(1) manual page but the utility is not included
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=850832

View File

@ -0,0 +1,16 @@
summary: Test for BZ#850832 (The binutils package contains the windmc(1) manual)
description: |
Bug summary: The binutils package contains the windmc(1) manual page but the utility is not included
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=850832
contact: Milos Prchlik <mprchlik@redhat.com>
component:
- binutils
test: ./runtest.sh
framework: beakerlib
recommend:
- binutils
duration: 5m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=850832
extra-summary: /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual
extra-task: /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual

View File

@ -0,0 +1,61 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual
# Description: Test for BZ#850832 (The binutils package contains the windmc(1) manual)
# Author: Milos Prchlik <mprchlik@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# 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, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="binutils"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest
rlRun "rpm -ql binutils | grep windmc > windmc.txt" 0,1
rlLogInfo "$(cat windmc.txt)"
rlRun "FILE_CNT=`cat windmc.txt | wc -l`"
if [ "$FILE_CNT" == "1" ]; then
rlFail "Either windmg manpage or binary is present - both options are wrong."
elif [ "$FILE_CNT" == "2" ]; then
rlLogWarning "Both windmc manpage and binary are present - this probably should not happen."
elif [ "$FILE_CNT" == "0" ]; then
rlPass "Windmc manpage nor binary are present"
else
rlLogWarning "Unexpected number of 'windmc' files present in binutils package - broken package/test?"
fi
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd