19841305 Some pixz tests can be hooked up.
--- a/components/pixz/Makefile Tue Sep 29 14:11:08 2015 -0700
+++ b/components/pixz/Makefile Fri Oct 02 09:49:29 2015 -0700
@@ -53,16 +53,37 @@
COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
COMPONENT_BUILD_ARGS += LDFLAGS="$(CC_BITS)"
+# Create a small testball to use with the test script.
+COMPONENT_PRE_TEST_ACTION = \
+ (cd $(@D); tar cvf pixz-test-tarball.tar *.c *.o)
+COMPONENT_PRE_SYSTEM_TEST_ACTION = \
+ (cd $(@D); tar cvf pixz-test-tarball.tar *.c *.o)
+
+COMPONENT_TEST_TRANSFORMS += \
+ '-e "/^real/d" ' \
+ '-e "/^user/d" ' \
+ '-e "/^sys/d" '
+
+COMPONENT_TEST_ENV = PATH=$(GNUBIN):$(PATH)
+COMPONENT_TEST_CMD = $(SOURCE_DIR)/test.sh
+COMPONENT_TEST_ARGS = pixz-test-tarball.tar pixz.c
+COMPONENT_TEST_TARGETS =
+
+COMPONENT_SYSTEM_TEST_ENV = PATH=$(GNUBIN):$(PATH)
+COMPONENT_SYSTEM_TEST_ENV += PIXZ_BIN=/usr/bin/pixz
+COMPONENT_SYSTEM_TEST_CMD = $(SOURCE_DIR)/test.sh
+COMPONENT_SYSTEM_TEST_ARGS = pixz-test-tarball.tar pixz.c
+COMPONENT_SYSTEM_TEST_TARGETS =
+
ASLR_MODE = $(ASLR_ENABLE)
-# common targets
build: $(BUILD_64)
install: $(BUILD_64)
-test: $(NO_TESTS)
+test: $(TEST_64)
-system-test: $(NO_TESTS)
+system-test: build $(SYSTEM_TEST_64)
REQUIRED_PACKAGES += compress/xz
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pixz/patches/system-test.patch Fri Oct 02 09:49:29 2015 -0700
@@ -0,0 +1,24 @@
+Patch to allow us to specify an alternate pixz binary when running tests.
+
+This patch should be sent upstream.
+
+--- pixz-1.0/test.sh.orig 2015-10-01 05:53:31.844847241 -0700
++++ pixz-1.0/test.sh 2015-10-01 06:03:39.267035275 -0700
+@@ -3,13 +3,15 @@
+ tarball=$1
+ sample=$2
+
++PIXZ="${PIXZ_BIN:-./pixz}"
++
+ echo XZ
+ time xz -c < "$tarball" > test.txz
+ time xz -cd < test.txz | tar xO "$sample" | md5sum
+
+ echo; echo; echo PIXZ
+-time ./pixz < "$tarball" > test.tpxz
+-time ./pixz -x "$sample" < test.tpxz | tar xO "$sample" | md5sum
++time $PIXZ < "$tarball" > test.tpxz
++time $PIXZ -x "$sample" < test.tpxz | tar xO "$sample" | md5sum
+
+ echo; echo; echo CROSS
+ xz -cd < test.tpxz | tar xO "$sample" | md5sum
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/pixz/test/results-64.master Fri Oct 02 09:49:29 2015 -0700
@@ -0,0 +1,19 @@
+XZ
+
+d41d8cd98f00b204e9800998ecf8427e -
+
+
+
+PIXZ
+
+d41d8cd98f00b204e9800998ecf8427e -
+
+
+
+CROSS
+d41d8cd98f00b204e9800998ecf8427e -
+
+
+512 pixz-test-tarball.tar
+512 test.tpxz
+512 test.txz