public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Don't use wc in gotest
@ 2018-10-26  4:42 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2018-10-26  4:42 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

The last patch to libgo added a use of wc to the gotest script.
However, wc is not in the GNU approved list of Makefile utilities
(https://www.gnu.org/prep/standards/html_node/Utilities-in-Makefiles.html#Utilities-in-Makefiles).
So replace it by sed.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline.

Ian

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1024 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 265510)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-407a59831ea4fbfe03f0887c40497b73939e7c44
+0a58bd7d820dac8931e8da5b291f19c3c7e6bee3
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: libgo/testsuite/gotest
===================================================================
--- libgo/testsuite/gotest	(revision 265510)
+++ libgo/testsuite/gotest	(working copy)
@@ -518,10 +518,9 @@ symtogo() {
   local ndots=""
   for tp in $*
   do
-    s=$(echo $tp | sed -e 's/\.\.z2f/%/g' | sed -e 's/.*%//')
+    s=$(echo "$tp" | sed -e 's/\.\.z2f/%/g' | sed -e 's/.*%//')
     # screen out methods (X.Y.Z)
-    ndots=$(echo $s | sed -e 's/\./ /g' | wc -w)
-    if [ $ndots -ne 2 ]; then
+    if ! expr "$s" : '^[^.]*\.[^.]*$' >/dev/null 2>&1; then
       continue
     fi
     if [ -z "${result}" ]; then

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-10-26  2:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-26  4:42 libgo patch committed: Don't use wc in gotest Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).