Add a document for introducing the runtime field.
Signed-off-by: Zhang Yale ylzhangah@qq.com --- doc/job/runtime.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/job/runtime.md
diff --git a/doc/job/runtime.md b/doc/job/runtime.md new file mode 100644 index 0000000..8e720f8 --- /dev/null +++ b/doc/job/runtime.md @@ -0,0 +1,32 @@ +# runtime + +Meaning: +- Run time for test: seconds(s), hours(h) or days(d). +- Limit the test's run time in $runtime. + +Usage example: + +```bash +#!/bin/sh +# - runtime + +## delay for a specified amount of time +echo sleep started +exec sleep ${1:-$runtime} +echo sleep finished +``` + +`runtime` is a parameter of test script. +For any test case needing parameter(s), +need such comment line and follow exactly the +same format `# - parameter`. + +```yaml +suite: borrow +testcase: borrow + +runtime: 1d + +sleep: +``` +