diff --git a/Sanity/smoke-test/Makefile b/Sanity/smoke-test/Makefile new file mode 100644 index 0000000..95bcee6 --- /dev/null +++ b/Sanity/smoke-test/Makefile @@ -0,0 +1,65 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/acpid/Sanity/smoke-test +# Description: smoke test +# Author: Jaroslav Škarvada +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 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/acpid/Sanity/smoke-test +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: Jaroslav Škarvada " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: smoke test" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: acpid" >> $(METADATA) + @echo "Requires: acpid" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: yes" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Type: Tier1" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/Sanity/smoke-test/PURPOSE b/Sanity/smoke-test/PURPOSE new file mode 100644 index 0000000..b377771 --- /dev/null +++ b/Sanity/smoke-test/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/acpid/Sanity/smoke-test +Description: smoke test +Author: Jaroslav Škarvada diff --git a/Sanity/smoke-test/main.fmf b/Sanity/smoke-test/main.fmf new file mode 100644 index 0000000..cf23d05 --- /dev/null +++ b/Sanity/smoke-test/main.fmf @@ -0,0 +1,27 @@ +summary: smoke test +description: '' +contact: Petr Sklenar +component: + - acpid +test: ./runtest.sh +framework: beakerlib +recommend: + - acpid +duration: 5m +enabled: true +tag: + - NoRHEL4 + - NoRHEL5 + - TIPfail_infra + - Tier1 +tier: '1' +adjust: + - enabled: false + when: distro == rhel-4, rhel-5 + continue: false + - enabled: false + when: arch != i386 and arch != x86_64 + continue: false +extra-nitrate: TC#0599476 +extra-summary: /CoreOS/acpid/Sanity/smoke-test +extra-task: /CoreOS/acpid/Sanity/smoke-test diff --git a/Sanity/smoke-test/runtest.sh b/Sanity/smoke-test/runtest.sh new file mode 100755 index 0000000..9049a19 --- /dev/null +++ b/Sanity/smoke-test/runtest.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/acpid/Sanity/smoke-test +# Description: smoke test +# Author: Jaroslav Škarvada +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2019 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="acpid" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlServiceStart "acpid" + rlPhaseEnd + + rlPhaseStartTest + rlRun "acpi_listen -t 5" 0 "Listening for acpid events" + rlPhaseEnd + + rlPhaseStartCleanup + rlServiceRestore "acpid" + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd