Enable gating test for dmidecode
Enable gating test for c10s dmidecode by copying from c9s. Resolves: RHEL-33027 Signed-off-by: Lichen Liu <lichliu@redhat.com>
This commit is contained in:
parent
35af5eb539
commit
a6eca09d18
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
64
tests/selftest/Makefile
Normal file
64
tests/selftest/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Makefile of /CoreOS/patch/Sanity/selftest
|
||||
# Description: Executes upstream test suite
|
||||
# Author: Miroslav Vadkerti <mvadkert@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# 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/dmidecode/Sanity/selftest
|
||||
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)
|
||||
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: Just executes binaries and checks for right exitcode." >> $(METADATA)
|
||||
@echo "Type: Sanity" >> $(METADATA)
|
||||
@echo "TestTime: 4m" >> $(METADATA)
|
||||
@echo "RunFor: dmidecode" >> $(METADATA)
|
||||
@echo "Requires: dmidecode" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Architectures: i386 x86_64 ia64" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
4
tests/selftest/PURPOSE
Normal file
4
tests/selftest/PURPOSE
Normal file
@ -0,0 +1,4 @@
|
||||
PURPOSE of /CoreOS/dmidecode/Sanity/selftest
|
||||
Description: Just executes binaries and checks for right exitcode.
|
||||
Author: Matej Susta <msusta@redhat.com>
|
||||
|
60
tests/selftest/runtest.sh
Executable file
60
tests/selftest/runtest.sh
Executable file
@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/dmidecode/Sanity/basic-sanity-check
|
||||
# Description: Just executes binaries and checks for right exitcode.
|
||||
# Author: Matej Susta <msusta@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# 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 rhts environment
|
||||
. /usr/bin/rhts-environment.sh
|
||||
. /usr/share/rhts-library/rhtslib.sh
|
||||
|
||||
PACKAGE="dmidecode"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup Setup
|
||||
rlAssertRpm $PACKAGE
|
||||
if [ "`uname -p`" = "ia64" ]; then
|
||||
IA64=1
|
||||
fi
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest Testing
|
||||
(($IA64)) || rlRun "biosdecode" 0 "biosdecode"
|
||||
rlRun "dmidecode >$TmpDir/normal" 0 "dmidecode without args"
|
||||
grep "OUT OF SPEC" "$TmpDir/normal" && rlLogWarning "OUT OF SPEC issue, see bug #714591 and bug #714595"
|
||||
|
||||
rlAssertNotGrep "BAD INDEX" "$TmpDir/normal"
|
||||
# DBG:
|
||||
echo "##### NORMAL #####"
|
||||
cat $TmpDir/normal
|
||||
rlRun "dmidecode --quiet >$TmpDir/quiet" 0 "dmidecode in quieter mode"
|
||||
rlRun "diff $TmpDir/normal $TmpDir/quiet" 1 "quiet should be quiet"
|
||||
rlRun "dmidecode --type 0 >$TmpDir/type" 0 "dmidecode for type"
|
||||
rlRun "diff $TmpDir/normal $TmpDir/type" 1 "type output check"
|
||||
# rlRun "dmidecode --dump --quiet" 2 "dmidecode shouldn't like dump+quiet"
|
||||
(($IA64)) || rlRun "ownership" 0 "ownership"
|
||||
(($IA64)) || rlRun "vpddecode" 0 "vpddecode"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
# This first play always runs on the local staging system
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- selftest
|
||||
required_packages:
|
||||
- make
|
||||
- gcc
|
Loading…
Reference in New Issue
Block a user