summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Peck <bpeck@redhat.com>2013-04-08 11:16:29 -0400
committerBill Peck <bpeck@redhat.com>2013-04-08 11:16:29 -0400
commitc35496976374e56d40058260d7957283ea703162 (patch)
tree7690158ed70346afbba54b3ac27badc716e051d8
parent30fd8b1983d0ea6b7fb8b286c5c7d89f30653332 (diff)
downloadtests-c35496976374e56d40058260d7957283ea703162.tar.gz
tests-c35496976374e56d40058260d7957283ea703162.tar.xz
tests-c35496976374e56d40058260d7957283ea703162.zip
added uname-info test.
-rw-r--r--kernel/uname-info/Makefile60
-rw-r--r--kernel/uname-info/runtest.sh26
2 files changed, 86 insertions, 0 deletions
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 <bpeck@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+# 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 <bpeck@redhat.com>" > $(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