Skip to content

Commit

Permalink
ktest: When creating a new config, ask for BUILD_OPTIONS
Browse files Browse the repository at this point in the history
When creating a new config, ask for the BUILD_OPTIONS variable
that lets users add things like -j20 to the make.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed Dec 23, 2011
1 parent bb8474b commit dbd3783
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tools/testing/ktest/ktest.pl
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@
# which would require more options.
my $buildonly = 1;

# set when creating a new config
my $newconfig = 0;

my %entered_configs;
my %config_help;
my %variable;
Expand Down Expand Up @@ -179,6 +182,11 @@
(relative to OUTPUT_DIR)
EOF
;
$config_help{"BUILD_OPTIONS"} = << "EOF"
Options to add to \"make\" when building.
i.e. -j20
EOF
;
$config_help{"TARGET_IMAGE"} = << "EOF"
The place to put your image on the test machine.
EOF
Expand Down Expand Up @@ -306,7 +314,7 @@ sub get_ktest_config {

for (;;) {
print "$config = ";
if (defined($default{$config})) {
if (defined($default{$config}) && length($default{$config})) {
print "\[$default{$config}\] ";
}
$ans = <STDIN>;
Expand All @@ -329,6 +337,10 @@ sub get_ktest_configs {
get_ktest_config("BUILD_DIR");
get_ktest_config("OUTPUT_DIR");

if ($newconfig) {
get_ktest_config("BUILD_OPTIONS");
}

# options required for other than just building a kernel
if (!$buildonly) {
get_ktest_config("SSH_USER");
Expand Down Expand Up @@ -3094,6 +3106,7 @@ sub make_min_config {
}

if (! -f $ktest_config) {
$newconfig = 1;
get_test_case;
open(OUT, ">$ktest_config") or die "Can not create $ktest_config";
print OUT << "EOF"
Expand Down

0 comments on commit dbd3783

Please sign in to comment.