Skip to content

Commit acd98e2

Browse files
committed
ktest.pl: Have -D option work without a space
Allow -DBUILD_TYPE=boot work the same as -D BUILD_TYPE=boot just like normal single character option does in most applications. Cc: "John Warthog9 Hawley" <[email protected]> Cc: Dhaval Giani <[email protected]> Cc: Greg KH <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Steven Rostedt <[email protected]>
1 parent 3bcdb6e commit acd98e2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/testing/ktest/ktest.pl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4297,6 +4297,15 @@ sub die_usage {
42974297
$command_vars[$#command_vars + 1] = $val;
42984298
}
42994299

4300+
} elsif ( $ARGV[0] =~ m/^-D(.*)/) {
4301+
my $val = $1;
4302+
shift;
4303+
4304+
if ($val =~ m/(.*?):=(.*)$/) {
4305+
set_variable($1, $2, 1);
4306+
} else {
4307+
$command_vars[$#command_vars + 1] = $val;
4308+
}
43004309
} elsif ( $ARGV[0] eq "-h" ) {
43014310
die_usage;
43024311
} else {

0 commit comments

Comments
 (0)