From afc0d0554e4b1b60e6bd6173af30184e9ed4f449 Mon Sep 17 00:00:00 2001 From: Jan Kurik Date: Thu, 25 Mar 2021 21:30:41 +0100 Subject: [PATCH] Basic installation test case --- tests/Install/install-pcp/Makefile | 65 ++++++++++++++++++++++++++++ tests/Install/install-pcp/PURPOSE | 3 ++ tests/Install/install-pcp/main.fmf | 14 ++++++ tests/Install/install-pcp/runtest.sh | 39 +++++++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 tests/Install/install-pcp/Makefile create mode 100644 tests/Install/install-pcp/PURPOSE create mode 100644 tests/Install/install-pcp/main.fmf create mode 100755 tests/Install/install-pcp/runtest.sh diff --git a/tests/Install/install-pcp/Makefile b/tests/Install/install-pcp/Makefile new file mode 100644 index 0000000..7c8aa91 --- /dev/null +++ b/tests/Install/install-pcp/Makefile @@ -0,0 +1,65 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/pcp/Install/install-pcp +# Description: This task simply install pcp, by pulling it via Requires +# Author: Jan Kuřík +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 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=/tools/pcp/Install/install-pcp +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: Jan Kuřík " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: This task simply install pcp, by pulling it via Requires" >> $(METADATA) + @echo "Type: Install" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "Provides: library(pcp/install-pcp)" >> $(METADATA) + @echo "RunFor: pcp" >> $(METADATA) + @echo "Requires: pcp-testsuite" >> $(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/Install/install-pcp/PURPOSE b/tests/Install/install-pcp/PURPOSE new file mode 100644 index 0000000..88af095 --- /dev/null +++ b/tests/Install/install-pcp/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/pcp/Install/install-pcp +Description: This task simply install pcp, by pulling it via Requires +Author: Jan Kuřík diff --git a/tests/Install/install-pcp/main.fmf b/tests/Install/install-pcp/main.fmf new file mode 100644 index 0000000..56d6a80 --- /dev/null +++ b/tests/Install/install-pcp/main.fmf @@ -0,0 +1,14 @@ +summary: This task simply install pcp, by pulling it via Requires +description: '' +contact: Jan Kuřík +component: +- pcp +test: ./runtest.sh +framework: beakerlib +recommend: +- pcp +- pcp-testsuite +- time +duration: 15m +extra-summary: /tools/pcp/Install/install-pcp +extra-task: /tools/pcp/Install/install-pcp diff --git a/tests/Install/install-pcp/runtest.sh b/tests/Install/install-pcp/runtest.sh new file mode 100755 index 0000000..ace060d --- /dev/null +++ b/tests/Install/install-pcp/runtest.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/pcp/Install/install-pcp +# Description: This task simply install pcp, by pulling it via Requires +# Author: Jan Kuřík +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 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 + +PACKAGES="pcp" + +rlJournalStart + rlPhaseStartTest + rlPass "dummy assert" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd