From e23a003459b3443fabf5bb3de73a4e2bca51249d Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 19 Jul 2012 15:22:05 -0400 Subject: [PATCH] --- yaml --- r: 319796 b: refs/heads/master c: e5c2ec11a07b9e1e7eb714aad13583e2bbae49bd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/testing/ktest/ktest.pl | 8 ++++++++ trunk/tools/testing/ktest/sample.conf | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9df93a8caacc..13cdbe61d4a8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 921ed4c7208e5c466a87db0a11c6fdd26bcc2fe7 +refs/heads/master: e5c2ec11a07b9e1e7eb714aad13583e2bbae49bd diff --git a/trunk/tools/testing/ktest/ktest.pl b/trunk/tools/testing/ktest/ktest.pl index 31b941613f98..e91702eee580 100755 --- a/trunk/tools/testing/ktest/ktest.pl +++ b/trunk/tools/testing/ktest/ktest.pl @@ -106,6 +106,7 @@ my $grub_number; my $target; my $make; +my $pre_install; my $post_install; my $no_install; my $noclean; @@ -225,6 +226,7 @@ "ADD_CONFIG" => \$addconfig, "REBOOT_TYPE" => \$reboot_type, "GRUB_MENU" => \$grub_menu, + "PRE_INSTALL" => \$pre_install, "POST_INSTALL" => \$post_install, "NO_INSTALL" => \$no_install, "REBOOT_SCRIPT" => \$reboot_script, @@ -1669,6 +1671,12 @@ sub install { return if ($no_install); + if (defined($pre_install)) { + my $cp_pre_install = eval_kernel_version $pre_install; + run_command "$cp_pre_install" or + dodie "Failed to run pre install"; + } + my $cp_target = eval_kernel_version $target_image; run_scp_install "$outputdir/$build_target", "$cp_target" or diff --git a/trunk/tools/testing/ktest/sample.conf b/trunk/tools/testing/ktest/sample.conf index 4472452f5be1..19754e0c8c64 100644 --- a/trunk/tools/testing/ktest/sample.conf +++ b/trunk/tools/testing/ktest/sample.conf @@ -426,6 +426,14 @@ # (default "") #BUILD_OPTIONS = -j20 +# If you need to do some special handling before installing +# you can add a script with this option. +# The environment variable KERNEL_VERSION will be set to the +# kernel version that is used. +# +# default (undefined) +#PRE_INSTALL = ssh user@target rm -rf '/lib/modules/*-test*' + # If you need an initrd, you can add a script or code here to install # it. The environment variable KERNEL_VERSION will be set to the # kernel version that is used. Remember to add the initrd line