diff options
author | Bill Peck <bpeck@redhat.com> | 2014-04-04 11:34:14 -0400 |
---|---|---|
committer | Bill Peck <bpeck@redhat.com> | 2014-04-04 11:34:14 -0400 |
commit | 82d72d2df56df9ec7396e981985f8ef8d28551ea (patch) | |
tree | a24fdcdbb712d724384eec931e4fdc6863df215f | |
parent | ec83ff5b2bc45bcc2fe61235251ad96573ef5e41 (diff) | |
download | tests-82d72d2df56df9ec7396e981985f8ef8d28551ea.tar.gz tests-82d72d2df56df9ec7396e981985f8ef8d28551ea.tar.xz tests-82d72d2df56df9ec7396e981985f8ef8d28551ea.zip |
Simple env task to show what variables are defined when running tests
-rw-r--r-- | restraint/env/metadata/metadata | 11 | ||||
-rw-r--r-- | restraint/env/metadata/runtest.sh | 4 | ||||
-rw-r--r-- | restraint/env/testinfo.desc/Makefile | 47 | ||||
-rw-r--r-- | restraint/env/testinfo.desc/runtest.sh | 4 |
4 files changed, 66 insertions, 0 deletions
diff --git a/restraint/env/metadata/metadata b/restraint/env/metadata/metadata new file mode 100644 index 0000000..db1ecf6 --- /dev/null +++ b/restraint/env/metadata/metadata @@ -0,0 +1,11 @@ +[General] +name=/restraint/env/metadata +owner=Bill Peck <bpeck@redhat.com> +description=just reports env variables +license=GPLv2 +confidential=no +destructive=no + +[restraint] +entry_point=./runtest.sh +max_time=5m diff --git a/restraint/env/metadata/runtest.sh b/restraint/env/metadata/runtest.sh new file mode 100644 index 0000000..e227b74 --- /dev/null +++ b/restraint/env/metadata/runtest.sh @@ -0,0 +1,4 @@ +#!/bin/bash -x + +env +rstrnt-report-result $RSTRNT_TASKNAME PASS diff --git a/restraint/env/testinfo.desc/Makefile b/restraint/env/testinfo.desc/Makefile new file mode 100644 index 0000000..1aa9d4f --- /dev/null +++ b/restraint/env/testinfo.desc/Makefile @@ -0,0 +1,47 @@ +# The toplevel namespace within which the test lives. +TOPLEVEL_NAMESPACE=/restraint + +# The name of the package under test: +PACKAGE_NAME=kernel + +# The path of the test below the package: +RELATIVE_PATH=env/testinfo.desc + +# The test version: +export TESTVERSION=1.1 + +# The test namespace as it will appear: +export TEST=$(TOPLEVEL_NAMESPACE)/$(RELATIVE_PATH) + +# Built executables should be added here: +BUILT_FILES=$(METADATA) + +# the list of files that will be added to the test rpm: +FILES=$(BUILT_FILES) runtest.sh Makefile + +TEST_DIR=/mnt/tests$(TEST) + +build: $(BUILT_FILES) + +clean: + rm -f *~ $(BUILT_FILES) + +run: build + chmod a+x ./runtest.sh + ./runtest.sh + +# Include global Makefile targets +include /usr/share/rhts/lib/rhts-make.include + +# Generate the testinfo.desc here: +$(METADATA): + @touch $(METADATA) + @echo "Owner: Bill Peck <bpeck@redhat.com>" > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Description: Reports back on the \ + environment variables" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "Priority: Manual" >> $(METADATA) + @echo "License: GPL" >> $(METADATA) diff --git a/restraint/env/testinfo.desc/runtest.sh b/restraint/env/testinfo.desc/runtest.sh new file mode 100644 index 0000000..77bb914 --- /dev/null +++ b/restraint/env/testinfo.desc/runtest.sh @@ -0,0 +1,4 @@ +#!/bin/bash -x + +env +report_result $TESTNAME PASS |