--- a/components/python/python27/Makefile Fri Feb 06 14:09:12 2015 -0800
+++ b/components/python/python27/Makefile Fri Feb 06 15:43:34 2015 -0800
@@ -181,6 +181,13 @@
COMPONENT_TEST_ENV += PATH="$(SPRO_VROOT)/bin:$(PATH)"
COMPONENT_TEST_TARGETS = test
+# The test output contains details from each test, in whatever order they
+# complete. The default _TRANSFORMER is not powerful enough to deal with
+# this; we need heavier artillery. Extract just the sections that start
+# with "tests OK." and end with "make: " for comparison.
+COMPONENT_TEST_TRANSFORMER = $(NAWK)
+COMPONENT_TEST_TRANSFORMS = "'/tests OK./ {results = 1}; /make: / {results = 0} {if (results) print $0 } '"
+
test: $(TEST_32_and_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python27/test/results-32.master Fri Feb 06 15:43:34 2015 -0800
@@ -0,0 +1,34 @@
+357 tests OK.
+4 tests failed:
+ test_ctypes test_doctest test_multiprocessing test_re
+39 tests skipped:
+ test_aepack test_al test_applesingle test_bsddb test_bsddb185
+ test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
+ test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
+ test_epoll test_gdb test_gl test_imgfile test_kqueue
+ test_linuxaudiodev test_macos test_macostools test_msilib
+ test_ossaudiodev test_pep277 test_scriptpackages test_smtpnet
+ test_socketserver test_startfile test_sunaudiodev test_timeout
+ test_tk test_ttk_guionly test_unicode_file test_urllib2net
+ test_urllibnet test_winreg test_winsound test_zipfile64
+9 skips unexpected on sunos5:
+ test_bsddb3 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
+ test_codecmaps_kr test_codecmaps_tw test_gdb test_ossaudiodev
+ test_sunaudiodev
+357 tests OK.
+4 tests failed:
+ test_ctypes test_doctest test_multiprocessing test_re
+39 tests skipped:
+ test_aepack test_al test_applesingle test_bsddb test_bsddb185
+ test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
+ test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
+ test_epoll test_gdb test_gl test_imgfile test_kqueue
+ test_linuxaudiodev test_macos test_macostools test_msilib
+ test_ossaudiodev test_pep277 test_scriptpackages test_smtpnet
+ test_socketserver test_startfile test_sunaudiodev test_timeout
+ test_tk test_ttk_guionly test_unicode_file test_urllib2net
+ test_urllibnet test_winreg test_winsound test_zipfile64
+9 skips unexpected on sunos5:
+ test_bsddb3 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
+ test_codecmaps_kr test_codecmaps_tw test_gdb test_ossaudiodev
+ test_sunaudiodev
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python27/test/results-64.master Fri Feb 06 15:43:34 2015 -0800
@@ -0,0 +1,36 @@
+355 tests OK.
+4 tests failed:
+ test_ctypes test_distutils test_doctest test_re
+41 tests skipped:
+ test_aepack test_al test_applesingle test_bsddb test_bsddb185
+ test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
+ test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
+ test_dl test_epoll test_gdb test_gl test_imageop test_imgfile
+ test_kqueue test_linuxaudiodev test_macos test_macostools
+ test_msilib test_ossaudiodev test_pep277 test_scriptpackages
+ test_smtpnet test_socketserver test_startfile test_sunaudiodev
+ test_timeout test_tk test_ttk_guionly test_unicode_file
+ test_urllib2net test_urllibnet test_winreg test_winsound
+ test_zipfile64
+10 skips unexpected on sunos5:
+ test_bsddb3 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
+ test_codecmaps_kr test_codecmaps_tw test_dl test_gdb
+ test_ossaudiodev test_sunaudiodev
+355 tests OK.
+4 tests failed:
+ test_ctypes test_distutils test_doctest test_re
+41 tests skipped:
+ test_aepack test_al test_applesingle test_bsddb test_bsddb185
+ test_bsddb3 test_cd test_cl test_codecmaps_cn test_codecmaps_hk
+ test_codecmaps_jp test_codecmaps_kr test_codecmaps_tw test_curses
+ test_dl test_epoll test_gdb test_gl test_imageop test_imgfile
+ test_kqueue test_linuxaudiodev test_macos test_macostools
+ test_msilib test_ossaudiodev test_pep277 test_scriptpackages
+ test_smtpnet test_socketserver test_startfile test_sunaudiodev
+ test_timeout test_tk test_ttk_guionly test_unicode_file
+ test_urllib2net test_urllibnet test_winreg test_winsound
+ test_zipfile64
+10 skips unexpected on sunos5:
+ test_bsddb3 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
+ test_codecmaps_kr test_codecmaps_tw test_dl test_gdb
+ test_ossaudiodev test_sunaudiodev
--- a/components/python/python34/Makefile Fri Feb 06 14:09:12 2015 -0800
+++ b/components/python/python34/Makefile Fri Feb 06 15:43:34 2015 -0800
@@ -177,6 +177,13 @@
# Prevent the tests from getting stuck waiting for input.
COMPONENT_TEST_TARGETS = test < /dev/null
+# The test output contains details from each test, in whatever order they
+# complete. The default _TRANSFORMER is not powerful enough to deal with
+# this; we need heavier artillery. Extract just the sections that start
+# with "tests OK." and end with "Re-running failed tests..." for comparison.
+COMPONENT_TEST_TRANSFORMER = $(NAWK)
+COMPONENT_TEST_TRANSFORMS = "'/tests OK./ {results = 1}; /Re-running failed tests in verbose mode/ {results = 0} {if (results) print $0 } '"
+
test: $(TEST_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python34/test/results-64.master Fri Feb 06 15:43:34 2015 -0800
@@ -0,0 +1,12 @@
+360 tests OK.
+9 tests failed:
+ test_cmd_line_script test_ctypes test_dtrace test_gdb test_import
+ test_readline test_site test_socket test_time
+2 tests altered the execution environment:
+ test___all__ test_warnings
+19 tests skipped:
+ test_curses test_epoll test_kqueue test_msilib test_ossaudiodev
+ test_pep277 test_smtpnet test_socketserver test_startfile
+ test_timeout test_tk test_ttk_guionly test_unicode_file
+ test_urllib2net test_urllibnet test_winreg test_winsound
+ test_xmlrpc_net test_zipfile64
--- a/doc/testing.txt Fri Feb 06 14:09:12 2015 -0800
+++ b/doc/testing.txt Fri Feb 06 15:43:34 2015 -0800
@@ -198,5 +198,13 @@
'-e "s|$(PERL)|\\$$(PERL)|g" ' \
'-e "s|$(SOURCE_DIR)|\\$$(SOURCE_DIR)|g" '
+Note that in some cases, gsed is not powerful enough. E.g., if you need to
+do more than massage or remove certain lines, but only compare certain sections
+of the file, then you may need to set COMPONENT_TEST_TRANSFORMER to something
+other than $(GSED) such as $(NAWK). In this case, you will want to set
+COMPONENT_TEST_TRANSFORMS using "=" instead of "+=", as the default sed
+transforms will likely need to be tossed aside in favor of whatever arguments
+your favorite transformer might need.
+
When your master test file(s) are in good shape, then you should "hg add"
them to your workspace.
--- a/make-rules/shared-macros.mk Fri Feb 06 14:09:12 2015 -0800
+++ b/make-rules/shared-macros.mk Fri Feb 06 15:43:34 2015 -0800
@@ -239,6 +239,9 @@
# set the default test snapshot file
COMPONENT_TEST_SNAPSHOT = $(COMPONENT_TEST_RESULTS_DIR)/results-$(BITS).snapshot
+# Normally $(GSED) is simplest, but some results files need more power.
+COMPONENT_TEST_TRANSFORMER = $(GSED)
+
# The set of default transforms to be applied to the test results to try
# to normalize them.
COMPONENT_TEST_TRANSFORMS = \
@@ -252,7 +255,7 @@
if [ -e $(COMPONENT_TEST_MASTER) ]; \
then \
print "\#!/bin/sh" > $(COMPONENT_TEST_TRANSFORM_CMD); \
- print '$(GSED) ' \
+ print '$(COMPONENT_TEST_TRANSFORMER) ' \
$(COMPONENT_TEST_TRANSFORMS) \
' \\' >> $(COMPONENT_TEST_TRANSFORM_CMD); \
print '$(COMPONENT_TEST_OUTPUT) \\' \