diff options
author | Bill Peck <bpeck@redhat.com> | 2014-04-07 09:35:16 -0400 |
---|---|---|
committer | Bill Peck <bpeck@redhat.com> | 2014-04-07 09:35:16 -0400 |
commit | 160779e2d7ff15c9dd3a63e2b49b5c9a77f9ce63 (patch) | |
tree | 56131eeb1ef91f7a6e8edacfda8cb7afc001f45a | |
parent | a4b9af1eb56b252b18d2a068bbccbab32b00a11d (diff) | |
download | tests-160779e2d7ff15c9dd3a63e2b49b5c9a77f9ce63.tar.gz tests-160779e2d7ff15c9dd3a63e2b49b5c9a77f9ce63.tar.xz tests-160779e2d7ff15c9dd3a63e2b49b5c9a77f9ce63.zip |
test that the harness can handle large time shifts
-rw-r--r-- | restraint/time_shift/Makefile | 43 | ||||
-rw-r--r-- | restraint/time_shift/runtest.sh | 14 |
2 files changed, 57 insertions, 0 deletions
diff --git a/restraint/time_shift/Makefile b/restraint/time_shift/Makefile new file mode 100644 index 0000000..1030fbd --- /dev/null +++ b/restraint/time_shift/Makefile @@ -0,0 +1,43 @@ +# The toplevel namespace within which the test lives. +TOPLEVEL_NAMESPACE=/restraint + +# The path of the test below the package: +RELATIVE_PATH=time_shift + +# 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: move the date time around" >> $(METADATA) + @echo "TestTime: 15m" >> $(METADATA) + @echo "Priority: Manual" >> $(METADATA) + @echo "License: GPL" >> $(METADATA) diff --git a/restraint/time_shift/runtest.sh b/restraint/time_shift/runtest.sh new file mode 100644 index 0000000..98fd9b4 --- /dev/null +++ b/restraint/time_shift/runtest.sh @@ -0,0 +1,14 @@ +#!/bin/bash -x + +. /usr/bin/rhts-environment.sh + + +report_result $TESTNAME/start PASS +date -s tomorrow +report_result $TESTNAME/tomorrow PASS +date -s yesterday +report_result $TESTNAME/yesterday PASS +date -s yesterday +report_result $TESTNAME/yesterday PASS +date -s tomorrow +report_result $TESTNAME/tomorrow PASS |