summaryrefslogtreecommitdiffstats
path: root/tests/deckard/contrib/libfaketime/test/README-testframe.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:55:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 00:55:53 +0000
commit3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch)
treef87bd4a126b3a843858eb447e8fd5893c3ee3882 /tests/deckard/contrib/libfaketime/test/README-testframe.txt
parentInitial commit. (diff)
downloadknot-resolver-upstream.tar.xz
knot-resolver-upstream.zip
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/deckard/contrib/libfaketime/test/README-testframe.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/deckard/contrib/libfaketime/test/README-testframe.txt b/tests/deckard/contrib/libfaketime/test/README-testframe.txt
new file mode 100644
index 0000000..d6980c3
--- /dev/null
+++ b/tests/deckard/contrib/libfaketime/test/README-testframe.txt
@@ -0,0 +1,39 @@
+# here's how the testframe script works.
+#
+# Usage for testing:
+# usage: testframe.sh DIR
+# testframe.sh runs each testsuite script found within DIR.
+# (in the context of libfaketime, the DIR is functest.)
+# exits with status 0 if all tests succeed.
+#
+# Interface:
+# by convention, each testsuite script (within DIR) must be
+# a bash script named test_*.sh. the script must define a
+# function named "run". run takes no arguments. run is
+# expected to call the framework-provided function
+# run_testcase once for each test function. run_testcase
+# uses the global vars NFAIL and NSUCC to keep track of how
+# many testcases failed/succeeded.
+#
+# the test function is expected to call something like
+# asserteq or assertneq (again, framework-provided).
+#
+# fine print: for each testsuite, the framework creates a
+# subshell and dots in the script. also dotted in are
+# testframe.inc and DIR/common.inc (if it exists). the
+# testsuite script can make use of any functions defined
+# in these inc files. the environment variable
+# TESTSUITE_NAME is set to the filename of the testsuite
+# script, for possible use in warning or info messages.
+#
+# see functests/test_true.sh for a simple example of
+# a test suite script.
+#
+# Simple steps to add a new testsuite:
+# 1. decide its name - eg, XXX.
+# 2. choose a DIR of similar testsuites to put it in, or create a new one.
+# 3. create DIR/test_XXX.sh.
+# 4. write a run function and testcase functions in DIR/test_XXX.sh.
+# 5. within the run function, call run_testcase for each testcase function.
+# 6. within each testcase function, call assertneq or asserteq, or do
+# the equivalent.