Commit 25bc70fa authored by Scott Wood's avatar Scott Wood Committed by Steven Rostedt (VMware)

ktest: Set buildonly=1 for CONFIG_BISECT_TYPE=build

Rather than adding a third copy of the same logic, rework it to cover
all three buildonly cases at once.

In the future, please consider using the same variable to perform the
same function regardless of context...

Link: http://lkml.kernel.org/r/20170717001630.10518-2-swood@redhat.comSigned-off-by: default avatarScott Wood <swood@redhat.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 6dd3791d
......@@ -721,21 +721,13 @@ sub set_value {
my $prvalue = process_variables($rvalue);
if ($buildonly && $lvalue =~ /^TEST_TYPE(\[.*\])?$/ && $prvalue ne "build") {
if ($lvalue =~ /^(TEST|BISECT|CONFIG_BISECT)_TYPE(\[.*\])?$/ &&
$prvalue !~ /^(config_|)bisect$/ &&
$prvalue !~ /^build$/ &&
$buildonly) {
# Note if a test is something other than build, then we
# will need other mandatory options.
if ($prvalue ne "install") {
# for bisect, we need to check BISECT_TYPE
if ($prvalue ne "bisect") {
$buildonly = 0;
}
} else {
# install still limits some mandatory options.
$buildonly = 2;
}
}
if ($buildonly && $lvalue =~ /^BISECT_TYPE(\[.*\])?$/ && $prvalue ne "build") {
if ($prvalue ne "install") {
$buildonly = 0;
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment