diff options
Diffstat (limited to 'tools/testing/ktest/ktest.pl')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 0a5ed0db4ff3..3d88be784df0 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -46,6 +46,7 @@ my $machine; | |||
46 | my $tmpdir; | 46 | my $tmpdir; |
47 | my $builddir; | 47 | my $builddir; |
48 | my $outputdir; | 48 | my $outputdir; |
49 | my $output_config; | ||
49 | my $test_type; | 50 | my $test_type; |
50 | my $build_type; | 51 | my $build_type; |
51 | my $build_options; | 52 | my $build_options; |
@@ -389,8 +390,8 @@ sub fail { | |||
389 | mkpath($faildir) or | 390 | mkpath($faildir) or |
390 | die "can't create $faildir"; | 391 | die "can't create $faildir"; |
391 | } | 392 | } |
392 | if (-f "$outputdir/.config") { | 393 | if (-f "$output_config") { |
393 | cp "$outputdir/.config", "$faildir/config" or | 394 | cp "$output_config", "$faildir/config" or |
394 | die "failed to copy .config"; | 395 | die "failed to copy .config"; |
395 | } | 396 | } |
396 | if (-f $buildlog) { | 397 | if (-f $buildlog) { |
@@ -619,7 +620,7 @@ sub install { | |||
619 | 620 | ||
620 | # should we process modules? | 621 | # should we process modules? |
621 | $install_mods = 0; | 622 | $install_mods = 0; |
622 | open(IN, "$outputdir/.config") or dodie("Can't read config file"); | 623 | open(IN, "$output_config") or dodie("Can't read config file"); |
623 | while (<IN>) { | 624 | while (<IN>) { |
624 | if (/CONFIG_MODULES(=y)?/) { | 625 | if (/CONFIG_MODULES(=y)?/) { |
625 | $install_mods = 1 if (defined($1)); | 626 | $install_mods = 1 if (defined($1)); |
@@ -706,7 +707,7 @@ sub build { | |||
706 | unlink $buildlog; | 707 | unlink $buildlog; |
707 | 708 | ||
708 | if ($type =~ /^useconfig:(.*)/) { | 709 | if ($type =~ /^useconfig:(.*)/) { |
709 | run_command "cp $1 $outputdir/.config" or | 710 | run_command "cp $1 $output_config" or |
710 | dodie "could not copy $1 to .config"; | 711 | dodie "could not copy $1 to .config"; |
711 | 712 | ||
712 | $type = "oldconfig"; | 713 | $type = "oldconfig"; |
@@ -717,20 +718,20 @@ sub build { | |||
717 | $type = "oldnoconfig"; | 718 | $type = "oldnoconfig"; |
718 | 719 | ||
719 | # allow for empty configs | 720 | # allow for empty configs |
720 | run_command "touch $outputdir/.config"; | 721 | run_command "touch $output_config"; |
721 | 722 | ||
722 | run_command "mv $outputdir/.config $outputdir/config_temp" or | 723 | run_command "mv $output_config $outputdir/config_temp" or |
723 | dodie "moving .config"; | 724 | dodie "moving .config"; |
724 | 725 | ||
725 | if (!$noclean && !run_command "$make mrproper") { | 726 | if (!$noclean && !run_command "$make mrproper") { |
726 | dodie "make mrproper"; | 727 | dodie "make mrproper"; |
727 | } | 728 | } |
728 | 729 | ||
729 | run_command "mv $outputdir/config_temp $outputdir/.config" or | 730 | run_command "mv $outputdir/config_temp $output_config" or |
730 | dodie "moving config_temp"; | 731 | dodie "moving config_temp"; |
731 | 732 | ||
732 | } elsif (!$noclean) { | 733 | } elsif (!$noclean) { |
733 | unlink "$outputdir/.config"; | 734 | unlink "$output_config"; |
734 | run_command "$make mrproper" or | 735 | run_command "$make mrproper" or |
735 | dodie "make mrproper"; | 736 | dodie "make mrproper"; |
736 | } | 737 | } |
@@ -1292,6 +1293,7 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
1292 | $buildlog = "$tmpdir/buildlog-$machine"; | 1293 | $buildlog = "$tmpdir/buildlog-$machine"; |
1293 | $dmesg = "$tmpdir/dmesg-$machine"; | 1294 | $dmesg = "$tmpdir/dmesg-$machine"; |
1294 | $make = "$makecmd O=$outputdir"; | 1295 | $make = "$makecmd O=$outputdir"; |
1296 | $output_config = "$outputdir/.config"; | ||
1295 | 1297 | ||
1296 | if ($reboot_type eq "grub") { | 1298 | if ($reboot_type eq "grub") { |
1297 | dodie "GRUB_MENU not defined" if (!defined($grub_menu)); | 1299 | dodie "GRUB_MENU not defined" if (!defined($grub_menu)); |