From 921ed4c7208e5c466a87db0a11c6fdd26bcc2fe7 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 19 Jul 2012 15:18:27 -0400 Subject: ktest: Add PRE/POST_KTEST and TEST options In order to let the user add commands before and after ktest runs, the PRE_KTEST and POST_KTEST options are defined. They hold shell commands that will execute befor ktest runs its first test, as well as when it completed its last test. The PRE_TEST and POST_TEST will be run befor and after (respectively) for a given test. They can either be global (done for all tests) or defined by a single test. Signed-off-by: Steven Rostedt --- tools/testing/ktest/sample.conf | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tools/testing/ktest/sample.conf') diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index cf362b3d1ec9..4472452f5be1 100644 --- a/tools/testing/ktest/sample.conf +++ b/tools/testing/ktest/sample.conf @@ -376,6 +376,24 @@ # DEFAULTS # DEFAULTS SKIP +# If you want to execute some command before the first test runs +# you can set this option. Note, it can be set as a default option +# or an option in the first test case. All other test cases will +# ignore it. If both the default and first test have this option +# set, then the first test will take precedence. +# +# default (undefined) +#PRE_KTEST = ${SSH} ~/set_up_test + +# If you want to execute some command after all the tests have +# completed, you can set this option. Note, it can be set as a +# default or any test case can override it. If multiple test cases +# set this option, then the last test case that set it will take +# precedence +# +# default (undefined) +#POST_KTEST = ${SSH} ~/dismantle_test + # The default test type (default test) # The test types may be: # build - only build the kernel, do nothing else @@ -426,6 +444,18 @@ # (default 0) #NO_INSTALL = 1 +# If there is a command that you want to run before the individual test +# case executes, then you can set this option +# +# default (undefined) +#PRE_TEST = ${SSH} reboot_to_special_kernel + +# If there is a command you want to run after the individual test case +# completes, then you can set this option. +# +# default (undefined) +#POST_TEST = cd ${BUILD_DIR}; git reset --hard + # If there is a script that you require to run before the build is done # you can specify it with PRE_BUILD. # -- cgit v1.2.3-59-g8ed1b