X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tests%2Fmultifeat.pl;h=875b4a2773874224c3a8418cee56a6b0e4b9d185;hb=65b6d8bdb6375c010d70f7aad399dae7c3ec15f6;hp=1169a3dafae938d871b48297df454988baac5827;hpb=9ba5bce06f71e610db752489b4f97e2af56c2577;p=oweals%2Fbusybox.git diff --git a/tests/multifeat.pl b/tests/multifeat.pl index 1169a3daf..875b4a277 100755 --- a/tests/multifeat.pl +++ b/tests/multifeat.pl @@ -11,14 +11,14 @@ $logfile = "multifeat.log"; -# How to handle all the BB_APPLET lines +# How to handle all the CONFIG_APPLET lines # (most thorough testing occurs when you call it with the -all switch) if ($ARGV[0] eq "-all" ) { shift(@ARGV); $choice="all"; } if ($ARGV[0] eq "-none") { shift(@ARGV); $choice="none"; } # neither means, leave that part of Config.h alone # Support building from pristine source -$make_opt = "-f $ARGV[0]/Makefile BB_SRC_DIR=$ARGV[0]" if ($ARGV[0] ne ""); +$make_opt = "-f $ARGV[0]/Makefile CONFIG_SRC_DIR=$ARGV[0]" if ($ARGV[0] ne ""); # Move the config file to a safe place -e "Config.h.orig" || 0==system("mv -f Config.h Config.h.orig") || die; @@ -42,7 +42,7 @@ while () { } } elsif ($in_features) { - if (/^\/*#define BB_FEATURE_([A-Z0-9_]*)/) { + if (/^\/*#define CONFIG_FEATURE_([A-Z0-9_]*)/) { push @features, $1; } if (/End of Features List/) { @@ -60,17 +60,19 @@ $failed_tests=0; for $f (@features) { # print "Testing build with feature $f ...\n"; open (O, ">Config.h") || die; - print O $header, "#define BB_FEATURE_$f\n", $trailer; + print O $header, "#define CONFIG_FEATURE_$f\n", $trailer; close O; system("echo -e '\n***\n$f\n***' >>$logfile"); - # todo: figure out why the "rm -f *.o" is needed - $result{$f} = system("rm -f *.o; make $make_opt busybox >>$logfile 2>&1"); + # With a fast computer and 1-second resolution on file timestamps, this + # process pushes beyond the limits of what unix make can understand. + # That's why need to weed out obsolete files before restarting make. + $result{$f} = system("rm -f *.o applet_source_list; make $make_opt busybox >>$logfile 2>&1"); $flag = $result{$f} ? "FAILED!!!" : "ok"; printf("Feature %-20s: %s\n", $f, $flag); $total_tests++; $failed_tests++ if $flag eq "FAILED!!!"; # pause long enough to let user stop us with a ^C - select(undef, undef, undef, 0.05); + select(undef, undef, undef, 0.03); } # Clean up our mess