diff options
Diffstat (limited to 'tools/testing/ktest')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 6620fe4b364f..c95209bac65a 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -930,6 +930,18 @@ sub check_buildlog { | |||
930 | return 1; | 930 | return 1; |
931 | } | 931 | } |
932 | 932 | ||
933 | sub make_oldconfig { | ||
934 | my ($defconfig) = @_; | ||
935 | |||
936 | if (!run_command "$defconfig $make oldnoconfig") { | ||
937 | # Perhaps oldnoconfig doesn't exist in this version of the kernel | ||
938 | # try a yes '' | oldconfig | ||
939 | doprint "oldnoconfig failed, trying yes '' | make oldconfig\n"; | ||
940 | run_command "yes '' | $defconfig $make oldconfig" or | ||
941 | dodie "failed make config oldconfig"; | ||
942 | } | ||
943 | } | ||
944 | |||
933 | sub build { | 945 | sub build { |
934 | my ($type) = @_; | 946 | my ($type) = @_; |
935 | my $defconfig = ""; | 947 | my $defconfig = ""; |
@@ -975,8 +987,12 @@ sub build { | |||
975 | $defconfig = "KCONFIG_ALLCONFIG=$minconfig"; | 987 | $defconfig = "KCONFIG_ALLCONFIG=$minconfig"; |
976 | } | 988 | } |
977 | 989 | ||
978 | run_command "$defconfig $make $type" or | 990 | if ($type eq "oldnoconfig") { |
979 | dodie "failed make config"; | 991 | make_oldconfig $defconfig; |
992 | } else { | ||
993 | run_command "$defconfig $make $type" or | ||
994 | dodie "failed make config"; | ||
995 | } | ||
980 | 996 | ||
981 | $redirect = "$buildlog"; | 997 | $redirect = "$buildlog"; |
982 | if (!run_command "$make $build_options") { | 998 | if (!run_command "$make $build_options") { |
@@ -1395,9 +1411,7 @@ sub create_config { | |||
1395 | close(OUT); | 1411 | close(OUT); |
1396 | 1412 | ||
1397 | # exit; | 1413 | # exit; |
1398 | run_command "$make oldnoconfig" or | 1414 | make_oldconfig ""; |
1399 | dodie "failed make config oldconfig"; | ||
1400 | |||
1401 | } | 1415 | } |
1402 | 1416 | ||
1403 | sub compare_configs { | 1417 | sub compare_configs { |
@@ -1599,8 +1613,7 @@ sub config_bisect { | |||
1599 | close(IN); | 1613 | close(IN); |
1600 | 1614 | ||
1601 | # Now run oldconfig with the minconfig (and addconfigs) | 1615 | # Now run oldconfig with the minconfig (and addconfigs) |
1602 | run_command "$defconfig $make oldnoconfig" or | 1616 | make_oldconfig $defconfig; |
1603 | dodie "failed make config oldconfig"; | ||
1604 | 1617 | ||
1605 | # check to see what we lost (or gained) | 1618 | # check to see what we lost (or gained) |
1606 | open (IN, $output_config) | 1619 | open (IN, $output_config) |