Commit dbd3783b authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

ktest: When creating a new config, ask for BUILD_OPTIONS

When creating a new config, ask for the BUILD_OPTIONS variable
that lets users add things like -j20 to the make.
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent bb8474b1
...@@ -140,6 +140,9 @@ my $successes = 0; ...@@ -140,6 +140,9 @@ my $successes = 0;
# which would require more options. # which would require more options.
my $buildonly = 1; my $buildonly = 1;
# set when creating a new config
my $newconfig = 0;
my %entered_configs; my %entered_configs;
my %config_help; my %config_help;
my %variable; my %variable;
...@@ -179,6 +182,11 @@ $config_help{"BUILD_TARGET"} = << "EOF" ...@@ -179,6 +182,11 @@ $config_help{"BUILD_TARGET"} = << "EOF"
(relative to OUTPUT_DIR) (relative to OUTPUT_DIR)
EOF EOF
; ;
$config_help{"BUILD_OPTIONS"} = << "EOF"
Options to add to \"make\" when building.
i.e. -j20
EOF
;
$config_help{"TARGET_IMAGE"} = << "EOF" $config_help{"TARGET_IMAGE"} = << "EOF"
The place to put your image on the test machine. The place to put your image on the test machine.
EOF EOF
...@@ -306,7 +314,7 @@ sub get_ktest_config { ...@@ -306,7 +314,7 @@ sub get_ktest_config {
for (;;) { for (;;) {
print "$config = "; print "$config = ";
if (defined($default{$config})) { if (defined($default{$config}) && length($default{$config})) {
print "\[$default{$config}\] "; print "\[$default{$config}\] ";
} }
$ans = <STDIN>; $ans = <STDIN>;
...@@ -329,6 +337,10 @@ sub get_ktest_configs { ...@@ -329,6 +337,10 @@ sub get_ktest_configs {
get_ktest_config("BUILD_DIR"); get_ktest_config("BUILD_DIR");
get_ktest_config("OUTPUT_DIR"); get_ktest_config("OUTPUT_DIR");
if ($newconfig) {
get_ktest_config("BUILD_OPTIONS");
}
# options required for other than just building a kernel # options required for other than just building a kernel
if (!$buildonly) { if (!$buildonly) {
get_ktest_config("SSH_USER"); get_ktest_config("SSH_USER");
...@@ -3094,6 +3106,7 @@ if ($#ARGV == 0) { ...@@ -3094,6 +3106,7 @@ if ($#ARGV == 0) {
} }
if (! -f $ktest_config) { if (! -f $ktest_config) {
$newconfig = 1;
get_test_case; get_test_case;
open(OUT, ">$ktest_config") or die "Can not create $ktest_config"; open(OUT, ">$ktest_config") or die "Can not create $ktest_config";
print OUT << "EOF" print OUT << "EOF"
......
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