20217381 libevent should run its tests
authorApril Chin <april.chin@oracle.com>
Fri, 06 Feb 2015 21:18:26 -0800
changeset 3750 60902b5c3237
parent 3749 4b214a886766
child 3752 a1cd93fa2e49
20217381 libevent should run its tests 20492864 libevent should have master test results to compare against
components/libevent/Makefile
components/libevent/test/results-all.master
make-rules/shared-macros.mk
--- a/components/libevent/Makefile	Fri Feb 06 16:50:21 2015 -0800
+++ b/components/libevent/Makefile	Fri Feb 06 21:18:26 2015 -0800
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
@@ -58,15 +58,23 @@
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
+COMPONENT_TEST_TARGETS =	verify
+
+# \x24 represents the character '$'
+COMPONENT_TEST_TRANSFORMS += \
+	'-e "s/^type: .* OKAY\x24/TYPE-COUNT-LINE OKAY/" '
+
+# Master test results are the same for 32-bit and 64-bit, so override
+# here, rather than create multiple identical master files.
+COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
+
 configure:	$(CONFIGURE_32_and_64)
 
 build:		$(BUILD_32_and_64)
 
 install:	$(INSTALL_32_and_64)
 
-# this isn't really true - there _are_ tests, but we can't run
-# them because we delete things that the tests want (see above).
-test:		$(NO_TESTS)
+test:		$(TEST_32_and_64)
 
 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libevent/test/results-all.master	Fri Feb 06 21:18:26 2015 -0800
@@ -0,0 +1,46 @@
+make[1]: Entering directory `$(@D)'
+cd test && make verify
+make[2]: Entering directory `$(@D)/test'
+Running tests:
+KQUEUE
+Skipping test
+DEVPOLL
+-n  test-eof: 
+OKAY
+-n  test-weof: 
+OKAY
+-n  test-time: 
+OKAY
+-n  regress: 
+TYPE-COUNT-LINE OKAY
+POLL
+-n  test-eof: 
+OKAY
+-n  test-weof: 
+OKAY
+-n  test-time: 
+OKAY
+-n  regress: 
+TYPE-COUNT-LINE OKAY
+SELECT
+-n  test-eof: 
+OKAY
+-n  test-weof: 
+OKAY
+-n  test-time: 
+OKAY
+-n  regress: 
+TYPE-COUNT-LINE OKAY
+EPOLL
+Skipping test
+EVPORT
+-n  test-eof: 
+OKAY
+-n  test-weof: 
+OKAY
+-n  test-time: 
+OKAY
+-n  regress: 
+TYPE-COUNT-LINE OKAY
+make[2]: Leaving directory `$(@D)/test'
+make[1]: Leaving directory `$(@D)'
--- a/make-rules/shared-macros.mk	Fri Feb 06 16:50:21 2015 -0800
+++ b/make-rules/shared-macros.mk	Fri Feb 06 21:18:26 2015 -0800
@@ -262,6 +262,9 @@
                 	>> $(COMPONENT_TEST_TRANSFORM_CMD); \
         	print '> $(COMPONENT_TEST_SNAPSHOT)' \
                 	>> $(COMPONENT_TEST_TRANSFORM_CMD); \
+	else \
+		print 'Cannot find $(COMPONENT_TEST_MASTER)'; \
+		exit 2; \
 	fi
 
 # set the default command for performing any test result munging
@@ -272,6 +275,9 @@
 	if [ -e $(COMPONENT_TEST_MASTER) ]; \
 	then \
 		$(SHELL) $(COMPONENT_TEST_TRANSFORM_CMD); \
+	else \
+		print 'Cannot find $(COMPONENT_TEST_MASTER)'; \
+		exit 2; \
 	fi
 
 # set the default command used to compare the master results with the snapshot
@@ -293,6 +299,9 @@
 		else \
 			print "No differences found."; \
 		fi \
+	else \
+		print 'Cannot find $(COMPONENT_TEST_MASTER)'; \
+		exit 2; \
 	fi
 
 # set the default env command to use for test of the component