aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/testing/ktest/ktest.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index 5d82c275e9e6..59738aa6ca73 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -1434,12 +1434,19 @@ sub monitor {
1434 return 1; 1434 return 1;
1435} 1435}
1436 1436
1437sub eval_kernel_version {
1438 my ($option) = @_;
1439
1440 $option =~ s/\$KERNEL_VERSION/$version/g;
1441
1442 return $option;
1443}
1444
1437sub do_post_install { 1445sub do_post_install {
1438 1446
1439 return if (!defined($post_install)); 1447 return if (!defined($post_install));
1440 1448
1441 my $cp_post_install = $post_install; 1449 my $cp_post_install = eval_kernel_version $post_install;
1442 $cp_post_install =~ s/\$KERNEL_VERSION/$version/g;
1443 run_command "$cp_post_install" or 1450 run_command "$cp_post_install" or
1444 dodie "Failed to run post install"; 1451 dodie "Failed to run post install";
1445} 1452}
@@ -1448,7 +1455,9 @@ sub install {
1448 1455
1449 return if ($no_install); 1456 return if ($no_install);
1450 1457
1451 run_scp "$outputdir/$build_target", "$target_image" or 1458 my $cp_target = eval_kernel_version $target_image;
1459
1460 run_scp "$outputdir/$build_target", "$cp_target" or
1452 dodie "failed to copy image"; 1461 dodie "failed to copy image";
1453 1462
1454 my $install_mods = 0; 1463 my $install_mods = 0;