[BusyBox] patch and test results

Larry Doolittle ldoolitt at recycle.lbl.gov
Thu Feb 1 20:31:21 UTC 2001


I messed with multibuild.pl some more, following up on a
suggestion by Erik.  It now reports a count of total tests
and failures.  It accepts a "-all" and "-none" switches,
that control (almost) all the BB_FEATURE_* macros.  And
you can ^C out of it, even on a fast computer.

We're doing well: except for problems in cmdedit.c under the
"-all" condition (which are fixed by using Vlad's latest),
there are _no_ errors detected!  That's 112 applets tested
under three different feature conditions.

I also slip in here the removal of a strange line in the Makefile;
when pwd_grp was added, Erik also added an explicit rule for $(OBJECTS)
that gets in my way when I do pristine source compiles.  AFAIK,
it has no benefit -- can anyone explain why it _should_ stay in?

      - Larry

diff -urN /home/ldoolitt/cvs/busybox/Config.h busybox-regress/Config.h
--- /home/ldoolitt/cvs/busybox/Config.h	Tue Jan 30 15:55:31 2001
+++ busybox-regress/Config.h	Thu Feb  1 11:58:34 2001
@@ -255,7 +255,7 @@
 //busybox.  Some systems want this, others do not.  Choose wisely.  :-) This
 //only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
 // Only relevant if BB_SH is enabled.
-//BB_FEATURE_SH_APPLETS_ALWAYS_WIN
+//#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
 //
 // Enable tab completion in the shell (not yet 
 // working very well -- so don't turn this on)
diff -urN /home/ldoolitt/cvs/busybox/Makefile busybox-regress/Makefile
--- /home/ldoolitt/cvs/busybox/Makefile	Wed Jan 31 09:23:20 2001
+++ busybox-regress/Makefile	Thu Feb  1 11:58:23 2001
@@ -248,7 +248,6 @@
 
 nfsmount.o cmdedit.o: %.o: %.h
 $(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
-	$(CC) $(CFLAGS) -c $*.c -o $*.o
 
 utility.o: loop.h
 
@@ -265,7 +264,7 @@
 	    docs/busybox.net/BusyBox.html
 	- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
 	    docs/busybox.pdf docs/busybox.net/busybox.html
-	- rm -f Config.h.ORG bb.def.h busybox.REGRESS.sh.results bb.OptionsAndFeatures
+	- rm -f Config.h.ORG bb.def.h busybox.REGRESS.sh.results bb.OptionsAndFeatures multibuild.log
 	- rm -rf docs/busybox _install
 	- rm -f busybox.links loop.h *~ *.o core
 
Binary files /home/ldoolitt/cvs/busybox/busybox and busybox-regress/busybox differ
diff -urN /home/ldoolitt/cvs/busybox/tests/multibuild.pl busybox-regress/tests/multibuild.pl
--- /home/ldoolitt/cvs/busybox/tests/multibuild.pl	Mon Jan 29 11:04:27 2001
+++ busybox-regress/tests/multibuild.pl	Thu Feb  1 12:06:18 2001
@@ -8,6 +8,11 @@
 
 $logfile = "multibuild.log";
 
+# How to handle all the BB_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 "");
 
@@ -21,6 +26,11 @@
 open(C,"<Config.h.orig") || die;
 while (<C>) {
 	if ($in_trailer) {
+		if (!$in_olympus) {
+			s/^\/\/#/#/ if ($choice eq "all"  && !/USE_DEVPS_PATCH/);
+			s/^#/\/\/#/ if ($choice eq "none" && !/USE_PROCFS/);
+		}
+		$in_olympus=1 if /End of Features List/;
 		$trailer .= $_;
 	} else {
 		$in_trailer=1 if /End of Applications List/;
@@ -32,6 +42,7 @@
 close C;
 
 # Do the real work ...
+$failed_tests=0;
 for $a (@apps) {
 	# print "Testing build of applet $a ...\n";
 	open (O, ">Config.h") || die;
@@ -42,10 +53,15 @@
 	$result{$a} = system("rm -f *.o; make $make_opt busybox >>$logfile 2>&1");
 	$flag = $result{$a} ? "FAIL" : "OK";
 	print "Applet $a: $flag\n";
+	$total_tests++;
+	$failed_tests++ if $flag eq "FAIL";
+	# pause long enough to let user stop us with a ^C
+	select(undef, undef, undef, 0.05);
 }
 
 # Clean up our mess
 system("mv -f Config.h.orig Config.h");
 
+print "$total_tests applets tested, $failed_tests failures\n";
 print "See $logfile for details.\n";
 





More information about the busybox mailing list