X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=tests%2Fmultibuild.pl;h=a3e49a625ba24eb2d8377e357a9c58711aa27ae9;hb=638da75f4b82e3156d30705412b545d172870fc0;hp=858da360fb6f31fcba2b810f06f7aaf5ea9ddf93;hpb=361ee514c636b371a50554ab73a3bfd54a49804d;p=oweals%2Fbusybox.git diff --git a/tests/multibuild.pl b/tests/multibuild.pl index 858da360f..a3e49a625 100755 --- a/tests/multibuild.pl +++ b/tests/multibuild.pl @@ -12,13 +12,13 @@ $logfile = "multibuild.log"; -# How to handle all the BB_FEATURE_FOO lines +# How to handle all the CONFIG_FEATURE_FOO lines 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; @@ -38,7 +38,7 @@ while () { $trailer .= $_; } else { $in_trailer=1 if /End of Applications List/; - if (/^\/*#define BB_([A-Z0-9_]*)/) { + if (/^\/*#define CONFIG_([A-Z0-9_]*)/) { push @apps, $1; } } @@ -50,17 +50,19 @@ $failed_tests=0; for $a (@apps) { # print "Testing build of applet $a ...\n"; open (O, ">Config.h") || die; - print O "#define BB_$a\n", $trailer; + print O "#define CONFIG_$a\n", $trailer; close O; system("echo -e '\n***\n$a\n***' >>$logfile"); - # todo: figure out why the "rm -f *.o" is needed - $result{$a} = 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{$a} = system("rm -f *.o applet_source_list; make $make_opt busybox >>$logfile 2>&1"); $flag = $result{$a} ? "FAILED!!!" : "ok"; printf("Applet %-20s: %s\n", $a, $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