Commit 2b29b2f8 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt

ktest: Evaluate $KERNEL_VERSION in both install and post install

The install process may also need to know what the kernel version
is, to add it to the name. Evaluate it for both install and
post install.
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 165708b2
...@@ -1434,12 +1434,19 @@ sub monitor { ...@@ -1434,12 +1434,19 @@ sub monitor {
return 1; return 1;
} }
sub eval_kernel_version {
my ($option) = @_;
$option =~ s/\$KERNEL_VERSION/$version/g;
return $option;
}
sub do_post_install { sub do_post_install {
return if (!defined($post_install)); return if (!defined($post_install));
my $cp_post_install = $post_install; my $cp_post_install = eval_kernel_version $post_install;
$cp_post_install =~ s/\$KERNEL_VERSION/$version/g;
run_command "$cp_post_install" or run_command "$cp_post_install" or
dodie "Failed to run post install"; dodie "Failed to run post install";
} }
...@@ -1448,7 +1455,9 @@ sub install { ...@@ -1448,7 +1455,9 @@ sub install {
return if ($no_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"; dodie "failed to copy image";
my $install_mods = 0; my $install_mods = 0;
......
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