diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-09-30 17:50:48 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-10-17 11:54:10 -0400 |
commit | e0a8742e3d4b7649be2ca6f22e7d45153505fc81 (patch) | |
tree | 897ad7c600b2339f89902dd2cb8770bae47bb2cd | |
parent | eaa1fe25ea79e94c6727a67baaca3da0791da5de (diff) |
ktest: Add NO_INSTALL option to not install for a test
There's cases where running the same kernel over and over again
is useful, and being able to not install the same kernel can
save time between tests.
Add a NO_INSTALL option that tells ktest.pl to not install the
new kernel.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 10 | ||||
-rw-r--r-- | tools/testing/ktest/sample.conf | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index ca6ff99ab1a5..74fb2acae18d 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -42,6 +42,7 @@ $default{"BISECT_MANUAL"} = 0; | |||
42 | $default{"BISECT_SKIP"} = 1; | 42 | $default{"BISECT_SKIP"} = 1; |
43 | $default{"SUCCESS_LINE"} = "login:"; | 43 | $default{"SUCCESS_LINE"} = "login:"; |
44 | $default{"DETECT_TRIPLE_FAULT"} = 1; | 44 | $default{"DETECT_TRIPLE_FAULT"} = 1; |
45 | $default{"NO_INSTALL"} = 0; | ||
45 | $default{"BOOTED_TIMEOUT"} = 1; | 46 | $default{"BOOTED_TIMEOUT"} = 1; |
46 | $default{"DIE_ON_FAILURE"} = 1; | 47 | $default{"DIE_ON_FAILURE"} = 1; |
47 | $default{"SSH_EXEC"} = "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND"; | 48 | $default{"SSH_EXEC"} = "ssh \$SSH_USER\@\$MACHINE \$SSH_COMMAND"; |
@@ -84,6 +85,7 @@ my $grub_number; | |||
84 | my $target; | 85 | my $target; |
85 | my $make; | 86 | my $make; |
86 | my $post_install; | 87 | my $post_install; |
88 | my $no_install; | ||
87 | my $noclean; | 89 | my $noclean; |
88 | my $minconfig; | 90 | my $minconfig; |
89 | my $start_minconfig; | 91 | my $start_minconfig; |
@@ -1094,6 +1096,8 @@ sub do_post_install { | |||
1094 | 1096 | ||
1095 | sub install { | 1097 | sub install { |
1096 | 1098 | ||
1099 | return if ($no_install); | ||
1100 | |||
1097 | run_scp "$outputdir/$build_target", "$target_image" or | 1101 | run_scp "$outputdir/$build_target", "$target_image" or |
1098 | dodie "failed to copy image"; | 1102 | dodie "failed to copy image"; |
1099 | 1103 | ||
@@ -2810,6 +2814,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
2810 | $reboot_type = set_test_option("REBOOT_TYPE", $i); | 2814 | $reboot_type = set_test_option("REBOOT_TYPE", $i); |
2811 | $grub_menu = set_test_option("GRUB_MENU", $i); | 2815 | $grub_menu = set_test_option("GRUB_MENU", $i); |
2812 | $post_install = set_test_option("POST_INSTALL", $i); | 2816 | $post_install = set_test_option("POST_INSTALL", $i); |
2817 | $no_install = set_test_option("NO_INSTALL", $i); | ||
2813 | $reboot_script = set_test_option("REBOOT_SCRIPT", $i); | 2818 | $reboot_script = set_test_option("REBOOT_SCRIPT", $i); |
2814 | $reboot_on_error = set_test_option("REBOOT_ON_ERROR", $i); | 2819 | $reboot_on_error = set_test_option("REBOOT_ON_ERROR", $i); |
2815 | $poweroff_on_error = set_test_option("POWEROFF_ON_ERROR", $i); | 2820 | $poweroff_on_error = set_test_option("POWEROFF_ON_ERROR", $i); |
@@ -2890,8 +2895,11 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
2890 | $run_type = "ERROR"; | 2895 | $run_type = "ERROR"; |
2891 | } | 2896 | } |
2892 | 2897 | ||
2898 | my $installme = ""; | ||
2899 | $installme = " no_install" if ($no_install); | ||
2900 | |||
2893 | doprint "\n\n"; | 2901 | doprint "\n\n"; |
2894 | doprint "RUNNING TEST $i of $opt{NUM_TESTS} with option $test_type $run_type\n\n"; | 2902 | doprint "RUNNING TEST $i of $opt{NUM_TESTS} with option $test_type $run_type$installme\n\n"; |
2895 | 2903 | ||
2896 | unlink $dmesg; | 2904 | unlink $dmesg; |
2897 | unlink $buildlog; | 2905 | unlink $buildlog; |
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index eadca3eb6f5a..b3e0dc11fc8a 100644 --- a/tools/testing/ktest/sample.conf +++ b/tools/testing/ktest/sample.conf | |||
@@ -294,6 +294,13 @@ | |||
294 | # or on some systems: | 294 | # or on some systems: |
295 | #POST_INSTALL = ssh user@target /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION | 295 | #POST_INSTALL = ssh user@target /sbin/dracut -f /boot/initramfs-test.img $KERNEL_VERSION |
296 | 296 | ||
297 | # If for some reason you just want to boot the kernel and you do not | ||
298 | # want the test to install anything new. For example, you may just want | ||
299 | # to boot test the same kernel over and over and do not want to go through | ||
300 | # the hassle of installing anything, you can set this option to 1 | ||
301 | # (default 0) | ||
302 | #NO_INSTALL = 1 | ||
303 | |||
297 | # If there is a script that you require to run before the build is done | 304 | # If there is a script that you require to run before the build is done |
298 | # you can specify it with PRE_BUILD. | 305 | # you can specify it with PRE_BUILD. |
299 | # | 306 | # |