public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* libgo patch committed: Only run net tests if GCCGO_RUN_ALL_TESTS
@ 2011-03-09  5:57 Ian Lance Taylor
  2011-03-09 15:45 ` Rainer Orth
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Lance Taylor @ 2011-03-09  5:57 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev; +Cc: ro

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

This patch to libgo only runs the networking dependent tests if
GCCGO_RUN_ALL_TESTS is set in the environment.  This is PR 48017.  In
that PR Rainer suggests having the tests drop back to UNSUPPORTED or
UNRESOLVED if they fail to open a network connection.  That is tempting
but I don't agree with it, because it means that the tests will never
fail.  It might be better to have some way to test whether the network
is available and usable before running the tests.  However, that is in
itself problematic, as people running all the gcc tests don't
necessarily want their machine to start opening network connections.  So
I think the compromise of requiring an environment variable works well.

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: 641 bytes --]

diff -r 49a9a1dcc2e8 libgo/Makefile.am
--- a/libgo/Makefile.am	Tue Mar 08 21:28:00 2011 -0800
+++ b/libgo/Makefile.am	Tue Mar 08 21:51:48 2011 -0800
@@ -2952,13 +2952,13 @@
 	fmt/check \
 	gob/check \
 	html/check \
-	http/check \
+	$(if $(GCCGO_RUN_ALL_TESTS),http/check) \
 	io/check \
 	json/check \
 	log/check \
 	math/check \
 	mime/check \
-	net/check \
+	$(if $(GCCGO_RUN_ALL_TESTS),net/check) \
 	netchan/check \
 	os/check \
 	patch/check \
@@ -2974,7 +2974,7 @@
 	strconv/check \
 	strings/check \
 	sync/check \
-	syslog/check \
+	$(if $(GCCGO_RUN_ALL_TESTS),syslog/check) \
 	tabwriter/check \
 	template/check \
 	time/check \

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libgo patch committed: Only run net tests if GCCGO_RUN_ALL_TESTS
  2011-03-09  5:57 libgo patch committed: Only run net tests if GCCGO_RUN_ALL_TESTS Ian Lance Taylor
@ 2011-03-09 15:45 ` Rainer Orth
  0 siblings, 0 replies; 2+ messages in thread
From: Rainer Orth @ 2011-03-09 15:45 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

Ian Lance Taylor <iant@google.com> writes:

> This patch to libgo only runs the networking dependent tests if
> GCCGO_RUN_ALL_TESTS is set in the environment.  This is PR 48017.  In
> that PR Rainer suggests having the tests drop back to UNSUPPORTED or
> UNRESOLVED if they fail to open a network connection.  That is tempting

My suggestion would have been to only change the test outcome for a `No
route to host' error (which would happen already for the DNS lookup).

> but I don't agree with it, because it means that the tests will never
> fail.  It might be better to have some way to test whether the network

Only if you change the test outcome for all errors, which obviously
isn't appropriate.

> is available and usable before running the tests.  However, that is in
> itself problematic, as people running all the gcc tests don't
> necessarily want their machine to start opening network connections.  So
> I think the compromise of requiring an environment variable works well.

Sort of works for me, but I fear that the tests will be only rarely be
run.  Perhaps the variable should be documented in the libgo/README*
files so at least libgo porters are aware of it.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-09 15:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-09  5:57 libgo patch committed: Only run net tests if GCCGO_RUN_ALL_TESTS Ian Lance Taylor
2011-03-09 15:45 ` Rainer Orth

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).