aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest/sample.conf
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-09-30 19:44:53 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-10-17 11:54:11 -0400
commit45d73a5d8a98dbabcdf37e2da5ef5b0412244643 (patch)
tree171cebe896512759e763a9d7bb36efe43455d1d1 /tools/testing/ktest/sample.conf
parent4ab1cce5bdd87948b75ed4fe4a8629c0f76267ae (diff)
ktest: Add IF and ELSE to config sections
Add IF keyword to sections within the config. Also added an ELSE keyword that allows different config options to be set for a given section. For example: TYPE := 1 STATUS := 0 DEFAULTS IF ${TYPE} [...] ELSE IF ${STATUS} [...] ELSE [...] The above will process the first section as $TYPE is true. If it was false, it would process the last section as $STATUS is false. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest/sample.conf')
-rw-r--r--tools/testing/ktest/sample.conf38
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf
index 67bc4e06922c..6a0a0ba59975 100644
--- a/tools/testing/ktest/sample.conf
+++ b/tools/testing/ktest/sample.conf
@@ -72,6 +72,44 @@
72# the same option name under the same test or as default 72# the same option name under the same test or as default
73# ktest will fail to execute, and no tests will run. 73# ktest will fail to execute, and no tests will run.
74# 74#
75# Both TEST_START and DEFAULTS sections can also have the IF keyword
76# The value after the IF must evaluate into a 0 or non 0 positive
77# integer, and can use the config variables (explained below).
78#
79# DEFAULTS IF ${IS_X86_32}
80#
81# The above will process the DEFAULTS section if the config
82# variable IS_X86_32 evaluates to a non zero positive integer
83# otherwise if it evaluates to zero, it will act the same
84# as if the SKIP keyword was used.
85#
86# The ELSE keyword can be used directly after a section with
87# a IF statement.
88#
89# TEST_START IF ${RUN_NET_TESTS}
90# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
91#
92# ELSE
93#
94# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-normal
95#
96#
97# The ELSE keyword can also contain an IF statement to allow multiple
98# if then else sections. But all the sections must be either
99# DEFAULT or TEST_START, they can not be a mixture.
100#
101# TEST_START IF ${RUN_NET_TESTS}
102# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
103#
104# ELSE IF ${RUN_DISK_TESTS}
105# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-tests
106#
107# ELSE IF ${RUN_CPU_TESTS}
108# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-cpu
109#
110# ELSE
111# BUILD_TYPE = useconfig:${CONFIG_DIR}/config-network
112#
75 113
76#### Config variables #### 114#### Config variables ####
77# 115#