public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Pass -v to nm in gotest
@ 2011-03-10  0:51 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2011-03-10  0:51 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

This libgo patch passes -v to nm in the gotest script.  That has no
effect on GNU nm (it's overridden by the -p option), and will tell
Solaris nm to sort by value.  With luck that will make the functions
apear in the order in which they appear in the source file, which is
what some of the tests expect.  It would be better if the tests were not
order dependent, but they are what they are.  This is for PR go/48020.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 784 bytes --]

diff -r a7ab61d1e5a1 libgo/testsuite/gotest
--- a/libgo/testsuite/gotest	Wed Mar 09 14:10:38 2011 -0800
+++ b/libgo/testsuite/gotest	Wed Mar 09 16:45:16 2011 -0800
@@ -274,7 +274,9 @@
 	# the grep -v eliminates methods and other special names
 	# that have multiple dots.
 	pattern='Test([^a-z].*)?'
-	tests=$($NM -p _gotest_.o $xofile | egrep ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
+	# The -p option tells GNU nm not to sort.
+	# The -v option tells Solaris nm to sort by value.
+	tests=$($NM -p -v _gotest_.o $xofile | egrep ' T .*\.'$pattern'$' | grep -v '\..*\..*\.' | sed 's/.* //' | sed 's/.*\.\(.*\.\)/\1/')
 	if [ "x$tests" = x ]; then
 		echo 'gotest: warning: no tests matching '$pattern in _gotest_.o $xofile 1>&2
 		exit 2

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

only message in thread, other threads:[~2011-03-10  0:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-10  0:51 libgo patch committed: Pass -v to nm 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).