From c35496976374e56d40058260d7957283ea703162 Mon Sep 17 00:00:00 2001 From: Bill Peck Date: Mon, 8 Apr 2013 11:16:29 -0400 Subject: added uname-info test. --- kernel/uname-info/Makefile | 60 ++++++++++++++++++++++++++++++++++++++++++++ kernel/uname-info/runtest.sh | 26 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 kernel/uname-info/Makefile create mode 100644 kernel/uname-info/runtest.sh diff --git a/kernel/uname-info/Makefile b/kernel/uname-info/Makefile new file mode 100644 index 0000000..ff47465 --- /dev/null +++ b/kernel/uname-info/Makefile @@ -0,0 +1,60 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /kernel/uname-info +# Description: reports back all uname data and rpm arch +# Author: Bill Peck +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 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=/kernel/uname-info +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile + +.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: Bill Peck " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Report all uname info and rpm arch" >> $(METADATA) + @echo "Type: Info" >> $(METADATA) + @echo "TestTime: 10m" >> $(METADATA) + @echo "Requires: coreutils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) diff --git a/kernel/uname-info/runtest.sh b/kernel/uname-info/runtest.sh new file mode 100644 index 0000000..6f0e8e6 --- /dev/null +++ b/kernel/uname-info/runtest.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Include Beaker environment +. /usr/bin/rhts-environment.sh || exit 1 + +echo -n "uname -s: " +uname -s +echo -n "uname -n: " +uname -n +echo -n "uname -r: " +uname -r +echo -n "uname -v: " +uname -v +echo -n "uname -m: " +uname -m +echo -n "uname -p: " +uname -p +echo -n "uname -i: " +uname -i +echo -n "uname -o: " +uname -o + +echo -n "kernel rpm arch: " +rpm -qf --qf '%{arch}\n' $(ls /boot/vmlinuz* | head -n 1) + +report_result $TEST PASS 0 -- cgit