]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libgo/go/cmd/go/internal/test/test.go
libgo: update to Go1.14beta1
[thirdparty/gcc.git] / libgo / go / cmd / go / internal / test / test.go
index 95000011d83b48791350bd7316c782841576f6ca..fb011d4c03f18f2ed50938c86372cf27789eb0f3 100644 (file)
@@ -572,8 +572,9 @@ func runTest(cmd *base.Command, args []string) {
        }
 
        // Pass timeout to tests if it exists.
+       // Prepend rather than appending so that it appears before positional arguments.
        if testActualTimeout > 0 {
-               testArgs = append(testArgs, "-test.timeout="+testActualTimeout.String())
+               testArgs = append([]string{"-test.timeout=" + testActualTimeout.String()}, testArgs...)
        }
 
        // show passing test output (after buffering) with -v flag.
@@ -828,7 +829,7 @@ func builderTest(b *work.Builder, p *load.Package) (buildAction, runAction, prin
        if p.ImportPath == "command-line-arguments" {
                elem = p.Name
        } else {
-               elem = load.DefaultExecName(p.ImportPath)
+               elem = p.DefaultExecName()
        }
        testBinary := elem + ".test"