21179642 pigz should have some master test results to compare against
authorJohn Beck <John.Beck@Oracle.COM>
Tue, 02 Jun 2015 15:40:18 -0700
changeset 4393 963a977eeb62
parent 4392 bc0af00a3a4a
child 4394 1c0a45174c92
21179642 pigz should have some master test results to compare against 21179650 implement 'gmake system-test' for pigz
components/pigz/Makefile
components/pigz/patches/300_system-test.patch
components/pigz/test/results-64.master
make-rules/ant.mk
make-rules/attpackagemake.mk
make-rules/justmake.mk
make-rules/makemaker.mk
--- a/components/pigz/Makefile	Thu May 28 10:11:41 2015 -0700
+++ b/components/pigz/Makefile	Tue Jun 02 15:40:18 2015 -0700
@@ -31,7 +31,6 @@
     sha256:e37498cbf3a475d7ebe2519751188c29564bf8dd27ba68bd3c7fe1ac08792759
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/pigz
-COMPONENT_TEST_TARGETS=	test
 
 TPNO=			11152
 
@@ -46,18 +45,20 @@
 CC += $(CC_BITS)
 COMPONENT_BUILD_ARGS += CC="$(CC)"
 COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS) -DHAVE_PTHREAD_SETNAME_NP"
+COMPONENT_SYSTEM_TEST_TARGETS=	test
+COMPONENT_SYSTEM_TEST_ENV=	TARGETDIR=/usr/bin
+COMPONENT_TEST_TARGETS=	test
+# Ignore these warnings that can come in random order.
+COMPONENT_TEST_TRANSFORMS += \
+    '-e "/^.*does not .* -- skipping/d" ' \
+    '-e "s|/usr/bin|\\$$(@D)|g" '
 
 ASLR_MODE = $(ASLR_ENABLE)
 
-# common targets
 build:		$(BUILD_64)
-
 install:	$(BUILD_64)
-
 test:		$(TEST_64)
-
-system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
-
+system-test:    $(SYSTEM_TEST_64)
 
 REQUIRED_PACKAGES += library/zlib
 REQUIRED_PACKAGES += system/library
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pigz/patches/300_system-test.patch	Tue Jun 02 15:40:18 2015 -0700
@@ -0,0 +1,68 @@
+Developed internally, for system-test; not suitable for upstream.
+
+--- pigz-2.2.5/Makefile.~4~	2015-06-01 08:32:01.403004646 -0700
++++ pigz-2.2.5/Makefile	2015-06-01 08:34:05.581419748 -0700
+@@ -1,5 +1,6 @@
+ CC=cc
+ CFLAGS=-O3 -Wall -Wextra
++TARGETDIR ?= $(shell pwd)
+ 
+ pigz: pigz.o yarn.o
+ 	$(CC) -o pigz pigz.o yarn.o -lz
+@@ -26,36 +27,36 @@
+ pigzn.o: pigz.c
+ 	$(CC) -Wall -O3 -DDEBUG -DNOTHREAD -g -c -o pigzn.o pigz.c
+ 
+-test: pigz
+-	./pigz -kf pigz.c ; ./pigz -t pigz.c.gz
+-	./pigz -kfb 32 pigz.c ; ./pigz -t pigz.c.gz
+-	./pigz -kfp 1 pigz.c ; ./pigz -t pigz.c.gz
+-	./pigz -kfz pigz.c ; ./pigz -t pigz.c.zz
+-	./pigz -kfK pigz.c ; ./pigz -t pigz.c.zip
+-	printf "" | ./pigz -cdf | wc -c | test `cat` -eq 0
+-	printf "x" | ./pigz -cdf | wc -c | test `cat` -eq 1
+-	printf "xy" | ./pigz -cdf | wc -c | test `cat` -eq 2
+-	printf "xyz" | ./pigz -cdf | wc -c | test `cat` -eq 3
+-	(printf "w" | gzip ; printf "x") | ./pigz -cdf | wc -c | test `cat` -eq 2
+-	(printf "w" | gzip ; printf "xy") | ./pigz -cdf | wc -c | test `cat` -eq 3
+-	(printf "w" | gzip ; printf "xyz") | ./pigz -cdf | wc -c | test `cat` -eq 4
++test: $(TARGETDIR)/pigz
++	$(TARGETDIR)/pigz -kf pigz.c ; $(TARGETDIR)/pigz -t pigz.c.gz
++	$(TARGETDIR)/pigz -kfb 32 pigz.c ; $(TARGETDIR)/pigz -t pigz.c.gz
++	$(TARGETDIR)/pigz -kfp 1 pigz.c ; $(TARGETDIR)/pigz -t pigz.c.gz
++	$(TARGETDIR)/pigz -kfz pigz.c ; $(TARGETDIR)/pigz -t pigz.c.zz
++	$(TARGETDIR)/pigz -kfK pigz.c ; $(TARGETDIR)/pigz -t pigz.c.zip
++	printf "" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 0
++	printf "x" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 1
++	printf "xy" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 2
++	printf "xyz" | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 3
++	(printf "w" | gzip ; printf "x") | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 2
++	(printf "w" | gzip ; printf "xy") | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 3
++	(printf "w" | gzip ; printf "xyz") | $(TARGETDIR)/pigz -cdf | wc -c | test `cat` -eq 4
+ 	-@if test "`type -f compress | grep /`" != ""; then \
+-	  echo 'compress -f < pigz.c | ./unpigz | cmp - pigz.c' ;\
+-	  compress -f < pigz.c | ./unpigz | cmp - pigz.c ;\
++	  echo 'compress -f < pigz.c | $(TARGETDIR)/unpigz | cmp - pigz.c' ;\
++	  compress -f < pigz.c | $(TARGETDIR)/unpigz | cmp - pigz.c ;\
+ 	fi
+ 	@rm -f pigz.c.gz pigz.c.zz pigz.c.zip
+ 	@rm -rf d/1 d/2
+ 	(mkdir -p d/1; cd d/1; tar xzf ../../../../pigz-2.2.5.tar.gz; \
+-	  cd ..; cp -pr 1 2; ../pigz -rp 4 --index %z 1; \
+-	  ../pigz -drp 4 --index %z 1; diff -r 1 2)
++	  cd ..; cp -pr 1 2; $(TARGETDIR)/pigz -rp 4 --index %z 1; \
++	  $(TARGETDIR)/pigz -drp 4 --index %z 1; diff -r 1 2)
+ 	@rm -rf d/1 d/2
+ 	(mkdir -p d/1; cd d/1; tar xzf ../../../../pigz-2.2.5.tar.gz; \
+-	  cd ..; cp -pr 1 2; ../pigz -zrp 4 -X %f.idx 1; \
+-	  ../pigz -dzrp 4 -X %f.idx 1; diff -r 1 2)
++	  cd ..; cp -pr 1 2; $(TARGETDIR)/pigz -zrp 4 -X %f.idx 1; \
++	  $(TARGETDIR)/pigz -dzrp 4 -X %f.idx 1; diff -r 1 2)
+ 	@rm -rf d/1 d/2
+ 
+ tests: dev test
+-	./pigzn -kf pigz.c ; ./pigz -t pigz.c.gz
++	$(TARGETDIR)/pigzn -kf pigz.c ; $(TARGETDIR)/pigz -t pigz.c.gz
+ 	@rm -f pigz.c.gz
+ 
+ docs: pigz.pdf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pigz/test/results-64.master	Tue Jun 02 15:40:18 2015 -0700
@@ -0,0 +1,23 @@
+make[1]: Entering directory `$(@D)'
+$(@D)/pigz -kf pigz.c ; $(@D)/pigz -t pigz.c.gz
+$(@D)/pigz -kfb 32 pigz.c ; $(@D)/pigz -t pigz.c.gz
+$(@D)/pigz -kfp 1 pigz.c ; $(@D)/pigz -t pigz.c.gz
+$(@D)/pigz -kfz pigz.c ; $(@D)/pigz -t pigz.c.zz
+$(@D)/pigz -kfK pigz.c ; $(@D)/pigz -t pigz.c.zip
+printf "" | $(@D)/pigz -cdf | wc -c | test `cat` -eq 0
+printf "x" | $(@D)/pigz -cdf | wc -c | test `cat` -eq 1
+printf "xy" | $(@D)/pigz -cdf | wc -c | test `cat` -eq 2
+printf "xyz" | $(@D)/pigz -cdf | wc -c | test `cat` -eq 3
+(printf "w" | gzip ; printf "x") | $(@D)/pigz -cdf | wc -c | test `cat` -eq 2
+(printf "w" | gzip ; printf "xy") | $(@D)/pigz -cdf | wc -c | test `cat` -eq 3
+(printf "w" | gzip ; printf "xyz") | $(@D)/pigz -cdf | wc -c | test `cat` -eq 4
+compress -f < pigz.c | $(@D)/unpigz | cmp - pigz.c
+(mkdir -p d/1; cd d/1; tar xzf ../../../../pigz-2.2.5.tar.gz; \
+  cd ..; cp -pr 1 2; $(@D)/pigz -rp 4 --index %z 1; \
+  $(@D)/pigz -drp 4 --index %z 1; diff -r 1 2)
+Common subdirectories: 1/pigz-2.2.5 and 2/pigz-2.2.5
+(mkdir -p d/1; cd d/1; tar xzf ../../../../pigz-2.2.5.tar.gz; \
+  cd ..; cp -pr 1 2; $(@D)/pigz -zrp 4 -X %f.idx 1; \
+  $(@D)/pigz -dzrp 4 -X %f.idx 1; diff -r 1 2)
+Common subdirectories: 1/pigz-2.2.5 and 2/pigz-2.2.5
+make[1]: Leaving directory `$(@D)'
--- a/make-rules/ant.mk	Thu May 28 10:11:41 2015 -0700
+++ b/make-rules/ant.mk	Tue Jun 02 15:40:18 2015 -0700
@@ -81,10 +81,14 @@
 	$(COMPONENT_TEST_CLEANUP)
 	$(TOUCH) $@
 
-# test the installed packages
+# Test the installed packages.  The targets above depend on .built which
+# means $(CLONEY) has already run.  System-test needs cloning but not
+# building; thus ideally, we would want to depend on .cloned here and below,
+# but since we don't have that, we depend on .prep and run $(CLONEY) here.
 $(BUILD_DIR)/%/.system-tested-and-compared:    $(SOURCE_DIR)/.prep
 	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
 	$(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	-(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
@@ -99,6 +103,7 @@
 	$(TOUCH) $@
 
 $(BUILD_DIR)/%/.system-tested:    $(SOURCE_DIR)/.prep
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
--- a/make-rules/attpackagemake.mk	Thu May 28 10:11:41 2015 -0700
+++ b/make-rules/attpackagemake.mk	Tue Jun 02 15:40:18 2015 -0700
@@ -117,10 +117,14 @@
 	$(COMPONENT_TEST_CLEANUP)
 	$(TOUCH) $@
 
-# test the installed packages
+# Test the installed packages.  The targets above depend on .built which
+# means $(CLONEY) has already run.  System-test needs cloning but not
+# building; thus ideally, we would want to depend on .cloned here and below,
+# but since we don't have that, we depend on .prep and run $(CLONEY) here.
 $(BUILD_DIR)/%/.system-tested-and-compared:    $(SOURCE_DIR)/.prep
 	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
 	$(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	-(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
@@ -135,6 +139,7 @@
 	$(TOUCH) $@
 
 $(BUILD_DIR)/%/.system-tested:    $(SOURCE_DIR)/.prep
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
--- a/make-rules/justmake.mk	Thu May 28 10:11:41 2015 -0700
+++ b/make-rules/justmake.mk	Tue Jun 02 15:40:18 2015 -0700
@@ -94,10 +94,14 @@
 	$(COMPONENT_TEST_CLEANUP)
 	$(TOUCH) $@
 
-# test the installed packages
+# Test the installed packages.  The targets above depend on .built which
+# means $(CLONEY) has already run.  System-test needs cloning but not
+# building; thus ideally, we would want to depend on .cloned here and below,
+# but since we don't have that, we depend on .prep and run $(CLONEY) here.
 $(BUILD_DIR)/%/.system-tested-and-compared:    $(SOURCE_DIR)/.prep
 	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
 	$(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	-(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
@@ -112,6 +116,7 @@
 	$(TOUCH) $@
 
 $(BUILD_DIR)/%/.system-tested:    $(SOURCE_DIR)/.prep
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
--- a/make-rules/makemaker.mk	Thu May 28 10:11:41 2015 -0700
+++ b/make-rules/makemaker.mk	Tue Jun 02 15:40:18 2015 -0700
@@ -172,10 +172,14 @@
 	$(COMPONENT_TEST_CLEANUP)
 	$(TOUCH) $@
 
-# test the installed packages
+# Test the installed packages.  The targets above depend on .built which
+# means $(CLONEY) has already run.  System-test needs cloning but not
+# building; thus ideally, we would want to depend on .cloned here and below,
+# but since we don't have that, we depend on .prep and run $(CLONEY) here.
 $(BUILD_DIR)/%/.system-tested-and-compared:    $(SOURCE_DIR)/.prep
 	$(RM) -rf $(COMPONENT_TEST_BUILD_DIR)
 	$(MKDIR) $(COMPONENT_TEST_BUILD_DIR)
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	-(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \
@@ -190,6 +194,7 @@
 	$(TOUCH) $@
 
 $(BUILD_DIR)/%/.system-tested:    $(SOURCE_DIR)/.prep
+	$(CLONEY) $(SOURCE_DIR) $(@D)
 	$(COMPONENT_PRE_SYSTEM_TEST_ACTION)
 	(cd $(COMPONENT_SYSTEM_TEST_DIR) ; \
 		$(COMPONENT_SYSTEM_TEST_ENV_CMD) $(COMPONENT_SYSTEM_TEST_ENV) \