summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Mancy <rmancy@redhat.com>2012-09-03 15:37:48 +1000
committerRaymond Mancy <rmancy@redhat.com>2012-09-03 15:37:48 +1000
commit2ff4d926f7312fba68ea3080a90036648ac6e009 (patch)
tree83d433cc4bb3ae7bc4a25a68faf05fb989a60ace
parent419452bc4b9c9ef0969fb8a9f1e8491c7abb5d26 (diff)
-rw-r--r--Tasks/distribution/beaker/make_logs/Makefile78
-rw-r--r--Tasks/distribution/beaker/make_logs/PURPOSE1
-rwxr-xr-xTasks/distribution/beaker/make_logs/runtest.sh16
3 files changed, 95 insertions, 0 deletions
diff --git a/Tasks/distribution/beaker/make_logs/Makefile b/Tasks/distribution/beaker/make_logs/Makefile
new file mode 100644
index 0000000..28d5b6a
--- /dev/null
+++ b/Tasks/distribution/beaker/make_logs/Makefile
@@ -0,0 +1,78 @@
+# Copyright (c) 2006 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 v.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.
+#
+
+# The toplevel namespace within which the test lives.
+# FIXME: You will need to change this:
+TOPLEVEL_NAMESPACE=distribution
+
+# The name of the package under test:
+# FIXME: you wil need to change this:
+PACKAGE_NAME=beaker
+
+# The path of the test below the package:
+# FIXME: you wil need to change this:
+RELATIVE_PATH=make_logs
+
+# Version of the Test. Used with make tag.
+export TESTVERSION=1.0
+
+# The combined namespace of the test.
+export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
+
+
+# A phony target is one that is not really the name of a file.
+# It is just a name for some commands to be executed when you
+# make an explicit request. There are two reasons to use a
+# phony target: to avoid a conflict with a file of the same
+# name, and to improve performance.
+.PHONY: all install download clean
+
+# executables to be built should be added here, they will be generated on the system under test.
+BUILT_FILES=
+
+# data files, .c files, scripts anything needed to either compile the test and/or run it.
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+run: $(FILES) build
+ ./runtest.sh
+
+build: $(BUILT_FILES)
+ chmod a+x ./runtest.sh
+
+clean:
+ rm -f *~ *.rpm $(BUILT_FILES)
+
+# You may need to add other targets e.g. to build executables from source code
+# Add them here:
+
+
+# Include Common Makefile
+include /usr/share/rhts/lib/rhts-make.include
+
+# Generate the testinfo.desc here:
+$(METADATA): Makefile
+ @touch $(METADATA)
+# Change to the test owner's name
+ @echo "Owner: Raymond Mancy <rmancy@redhat.com>" > $(METADATA)
+ @echo "Name: $(TEST)" >> $(METADATA)
+ @echo "Path: $(TEST_DIR)" >> $(METADATA)
+ @echo "License: GPLv2" >> $(METADATA)
+ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
+ @echo "Description: Create lots of logs, for testing purposes ">> $(METADATA)
+ @echo "TestTime: 1h" >> $(METADATA)
+ @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
+ @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
+
+# You may need other fields here; see the documentation
+ rhts-lint $(METADATA)
diff --git a/Tasks/distribution/beaker/make_logs/PURPOSE b/Tasks/distribution/beaker/make_logs/PURPOSE
new file mode 100644
index 0000000..6326b02
--- /dev/null
+++ b/Tasks/distribution/beaker/make_logs/PURPOSE
@@ -0,0 +1 @@
+This task is to create a bunch of logs for testing purposes
diff --git a/Tasks/distribution/beaker/make_logs/runtest.sh b/Tasks/distribution/beaker/make_logs/runtest.sh
new file mode 100755
index 0000000..32e8c46
--- /dev/null
+++ b/Tasks/distribution/beaker/make_logs/runtest.sh
@@ -0,0 +1,16 @@
+!# /usr/bin/bash
+. /usr/bin/rhts-environment.sh
+. /usr/share/beakerlib/beakerlib.sh
+
+function MakeLog()
+{
+ rlJournalStart
+ rlPhaseStartSetup
+ rlRun "for ((j=0;j<5;j++)); do echo 'blahblahblahblah'; done"
+ rlPhaseEnd
+ rlJournalEnd
+}
+
+for ((i=0;i < $SUBTASKS;i++)); do MakeLog;report_result TEST=$i PASS; done
+exit 0
+