diff mbox

Go testsuite patch committed: Don't optimize generated files

Message ID mcrd39hb88p.fsf@dhcp-172-18-216-180.mtv.corp.google.com
State New
Headers show

Commit Message

Ian Lance Taylor Feb. 14, 2012, 6:05 p.m. UTC
This patch to the Go testsuite drivers disables optimizations when
compiling the generated files produced for the 64bit and index tests.
These generated files are large, and optimizing them can cause testsuite
timeouts on slow systems.  Optimizing the code is not essential for the
tests, and the tests run quickly even when not optimized.  Ran Go
testsuite on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


2012-02-14  Ian Lance Taylor  <iant@google.com>

	PR go/48501
	* go.test/go-test.exp (go-gc-tests): Disable optimizations when
	compiling generated file for 64bit and index tests.
diff mbox

Patch

Index: gcc/testsuite/go.test/go-test.exp
===================================================================
--- gcc/testsuite/go.test/go-test.exp	(revision 184188)
+++ gcc/testsuite/go.test/go-test.exp	(working copy)
@@ -433,7 +433,12 @@  proc go-gc-tests { } {
 		} else {
 		    pass "$name execution"
 		    file delete $base-out.x
+		    # Disable optimizations as this test takes a long time
+		    # to compile.
+		    set hold $TORTURE_OPTIONS
+		    set TORTURE_OPTIONS [ list { -O0 -g }]
 		    go-torture-execute "./$base-out.go"
+		    set TORTURE_OPTIONS $hold
 		}
 		file delete $base-out.go
 	    }
@@ -940,7 +945,12 @@  proc go-gc-tests { } {
 		} else {
 		    pass "$name execution 0"
 		    file delete tmp.x
+		    # Disable optimizations as this test takes a long time
+		    # to compile.
+		    set hold $TORTURE_OPTIONS
+		    set TORTURE_OPTIONS [ list { -O0 -g }]
 		    go-torture-execute "./tmp.go"
+		    set TORTURE_OPTIONS $hold
 		}
 		if { [catch "exec $output_file -pass 1 >tmp.go"] != 0 } {
 		    fail "$name execution 1"