From 0e211461e95e598d0395b94bc376db7cb617a6f3 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 22 Dec 2011 11:25:46 -0500 Subject: [PATCH] --- yaml --- r: 285893 b: refs/heads/master c: 2b29b2f8f869847d437b525d4cf027c09dc38286 h: refs/heads/master i: 285891: 5446ad25325eade52d0f71a0c57d31cdca326346 v: v3 --- [refs] | 2 +- trunk/tools/testing/ktest/ktest.pl | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index af80949f9be8..15a01f758d7a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 165708b273f87ac52a4564b114a6c046e6b3a02d +refs/heads/master: 2b29b2f8f869847d437b525d4cf027c09dc38286 diff --git a/trunk/tools/testing/ktest/ktest.pl b/trunk/tools/testing/ktest/ktest.pl index 5d82c275e9e6..59738aa6ca73 100755 --- a/trunk/tools/testing/ktest/ktest.pl +++ b/trunk/tools/testing/ktest/ktest.pl @@ -1434,12 +1434,19 @@ sub monitor { return 1; } +sub eval_kernel_version { + my ($option) = @_; + + $option =~ s/\$KERNEL_VERSION/$version/g; + + return $option; +} + sub do_post_install { return if (!defined($post_install)); - my $cp_post_install = $post_install; - $cp_post_install =~ s/\$KERNEL_VERSION/$version/g; + my $cp_post_install = eval_kernel_version $post_install; run_command "$cp_post_install" or dodie "Failed to run post install"; } @@ -1448,7 +1455,9 @@ sub install { return if ($no_install); - run_scp "$outputdir/$build_target", "$target_image" or + my $cp_target = eval_kernel_version $target_image; + + run_scp "$outputdir/$build_target", "$cp_target" or dodie "failed to copy image"; my $install_mods = 0;