components/python/twisted/Makefile
changeset 3753 184414ddc0f0
parent 3744 a74b6fa1af7a
child 3817 30b42c38bbc4
--- a/components/python/twisted/Makefile	Mon Feb 09 16:14:43 2015 -0800
+++ b/components/python/twisted/Makefile	Mon Feb 09 16:16:56 2015 -0800
@@ -53,21 +53,22 @@
 # versions and different for x86 and SPARC platforms.
 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-$(PYTHON_VERSION)-$(BITS).$(MACH).master
 
-# The additional twisted specific set of transforms to be applied to the test
-# results to try to normalize them. Several of these lines are deleted (as
-# opposed to being normalized) because they appear in a non-deterministic
-# order. The "\x27" is a way of including the single quote character and not
-# fall foul of the special GNU sed escapes:
-# https://gnu.org/software/sed/manual/html_node/Escapes.html
-COMPONENT_TEST_TRANSFORMS += \
-	'-e "/(process:/d" ' \
-	'-e "/class \x27twisted.internet.tcp.Client/d" ' \
-	'-e "/class \x27twisted.internet.tcp.Port/d" ' \
-	'-e "/ThrottlingProtocol \#. on /d" ' \
-	'-e "/twisted.test.test_udp.Server on/d" ' \
-	'-e "/twisted.test.test_udp.Client on/d" ' \
-	'-e "/Bus Error/d" ' \
-	'-e "s|\(Ran 5919 tests in\).*|\1|" '
+# Using gsed with a specific set of transforms to be applied to the test
+# results to try to normalize them, was problematic. It resulted in 8
+# different ~650Kb master test files. Several of these lines needed to be
+# deleted (as opposed to being normalized) because they appear in a
+# non-deterministic order.
+#
+# Using nawk to just extract lines starting with:
+# [FAIL]: ...
+# [ERROR]: ...
+# Ran XXXX tests in ...
+# FAILED ...
+# OK
+# and stripping out the random portions (like time to complete the tests),
+# resulted in 8 master test files each less than 1Kb in size.
+COMPONENT_TEST_TRANSFORMER =    $(NAWK)
+COMPONENT_TEST_TRANSFORMS = "'/^\[FAIL\]: / { print }; /^\[ERROR\]: / { print }; /^Ran / { sub(\" tests in .+s\", \" tests in\"); print }; /^FAILED / { print }; /^OK / { print };'"
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)