diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-11-08 16:45:50 -0500 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-11-18 11:23:10 -0500 |
| commit | 21a9679feadf6b215c4f932b0df5d252b4822c45 (patch) | |
| tree | 9219442a28e6046c9972320ae8c074bb522471f0 /tools | |
| parent | 51ad1dd1034684e9c490eb41c17cde8ffb682ab1 (diff) | |
ktest: Allow a test case to undefine a default value
Allow a test case in the config file to undefine a default
value by specifying the option and equal sign but not assigning
it a value:
OPTION =
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/testing/ktest/ktest.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 3d88be784df..962c0f773e2 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
| @@ -97,6 +97,11 @@ sub set_value { | |||
| 97 | die "Error: Option $lvalue defined more than once!\n"; | 97 | die "Error: Option $lvalue defined more than once!\n"; |
| 98 | } | 98 | } |
| 99 | $opt{$lvalue} = $rvalue; | 99 | $opt{$lvalue} = $rvalue; |
| 100 | if ($rvalue =~ /^\s*$/) { | ||
| 101 | delete $opt{$lvalue}; | ||
| 102 | } else { | ||
| 103 | $opt{$lvalue} = $rvalue; | ||
| 104 | } | ||
| 100 | } | 105 | } |
| 101 | 106 | ||
| 102 | sub read_config { | 107 | sub read_config { |
