Fix TR to work on solaris. ihse-testmakefiles-branch
authorihse
Wed, 29 Nov 2017 23:28:21 +0100
branchihse-testmakefiles-branch
changeset 55918 5d6c5aa2fa19
parent 55917 2ac7a4ba6adf
child 55919 0ffb2cce1b19
Fix TR to work on solaris.
make/RunTests.gmk
--- a/make/RunTests.gmk	Wed Nov 29 22:42:24 2017 +0100
+++ b/make/RunTests.gmk	Wed Nov 29 23:28:21 2017 +0100
@@ -565,7 +565,7 @@
 # Now process each test to run and setup a proper make rule
 $(foreach test, $(TESTS_TO_RUN), \
   $(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
-      $(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
+      $(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
   $(eval ALL_TEST_IDS += $(TEST_ID)) \
   $(if $(call UseCustomTestHandler, $(test)), \
     $(eval $(call SetupRunCustomTest, $(TEST_ID), \
@@ -611,9 +611,9 @@
 	    TEST TOTAL PASS FAIL ERROR " "
 	$(foreach test, $(TESTS_TO_RUN), \
 	  $(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
-	      $(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
+	      $(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
 	    $(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
-	  $(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c \\n _)) \
+	  $(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \
 	  $(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
 	    $(eval TEST_NAME := ) \
 	    $(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" "  " "$(test)"  $(NEWLINE) \