[PATCH] Fix rtems-test-check with a BSD sed.

Chris Johns chrisj at rtems.org
Thu Mar 9 05:19:37 UTC 2017


BSD sed does not support '\t' and treated '[ \t]' as 3 characters. This patch
uses a standard method of supporting blank spaces.
---
 testsuites/automake/test-subdirs.am |  2 +-
 tools/build/rtems-test-check        | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/testsuites/automake/test-subdirs.am b/testsuites/automake/test-subdirs.am
index 380aae1619..f83f03541f 100644
--- a/testsuites/automake/test-subdirs.am
+++ b/testsuites/automake/test-subdirs.am
@@ -16,7 +16,7 @@ all-local:
 	fi; \
 	tdata="$(top_srcdir)/../../c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom/$(RTEMS_BSP)-testsuite.tcfg"; \
 	if test -f "$$tdata"; then \
-	  vtdata="$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom/$(RTEMS_BSP)-testsuite.cfg"; \
+	  vtdata="$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/make/custom/$(RTEMS_BSP)-testsuite.tcfg"; \
 	 else \
 	  vtdata="all tests"; \
 	fi; \
diff --git a/tools/build/rtems-test-check b/tools/build/rtems-test-check
index 108b7881c2..923af49306 100755
--- a/tools/build/rtems-test-check
+++ b/tools/build/rtems-test-check
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright 2014, 2016 Chris Johns <chrisj at rtems.org>
+# Copyright 2014, 2016, 2017 Chris Johns <chrisj at rtems.org>
 # All rights reserved
 #
 
@@ -74,21 +74,21 @@ if test -f $testdata; then
           state=$(echo $line | sed -e "s/:.*//g")
           case $state in
             include)
-              inf=$(echo $line | sed -e "s/include://g" -e 's/^[ \t]//;s/[ \t]$//')
+              inf=$(echo $line | sed -e 's/include://g;s/[[:blank:]]//g')
               if test -f $includepath/$inf; then
                 ntd="$includepath/$inf $ntd"
               fi
               ;;
             exclude)
-              line=$(echo $line | sed -e "s/exclude://g" -e 's/^[ \t]//;s/[ \t]$//')
+              line=$(echo $line | sed -e 's/exclude://g;s/[[:blank:]]//g')
               excluded_tests="${excluded_tests} $line"
               ;;
             expected-fail)
-              line=$(echo $line | sed -e "s/expected-fail://g" -e 's/^[ \t]//;s/[ \t]$//')
+              line=$(echo $line | sed -e 's/expected-fail://g;s/[[:blank:]]//g')
               expected_fails="${expected_fails} $line"
               ;;
             indeterminate)
-              line=$(echo $line | sed -e "s/indeterminate://g" -e 's/^[ \t]//;s/[ \t]$//')
+              line=$(echo $line | sed -e 's/indeterminate://g;s/[[:blank:]]//g')
               indeterminates="${indeterminates} $line"
               ;;
             *)
-- 
2.11.0



More information about the devel mailing list