]> Cypherpunks repositories - gostls13.git/commitdiff
go/internal/gccgoimporter: enable tests on Plan9
authorRobert Griesemer <gri@golang.org>
Thu, 18 Jun 2015 00:02:40 +0000 (17:02 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 18 Jun 2015 00:19:08 +0000 (00:19 +0000)
Work-around issue #11265 and re-enable tests for Plan9.

Change-Id: I3aabb674a149b8eb936f948dd4cda5fd81454646
Reviewed-on: https://go-review.googlesource.com/11194
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/go/internal/gccgoimporter/gccgoinstallation_test.go
src/go/internal/gccgoimporter/importer.go
src/go/internal/gccgoimporter/importer_test.go

index d9adcecab7c8c9f7d6db686781113f12e8cb0f30..ef293edcbec92633796999d686492bd678d87ecc 100644 (file)
@@ -2,10 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Exclude plan9 for now due to test failure with TestGoxImporter.
-// TODO(gri) eliminate this build tag
-// +build !plan9
-
 package gccgoimporter
 
 import (
index feb9849eefe90c747973059165ba0ad53174db66..aa0d01afdf382680b718014c9298396a2a0c116f 100644 (file)
@@ -88,6 +88,12 @@ func openExportFile(fpath string) (reader io.ReadSeeker, closer io.Closer, err e
        if err != nil {
                return
        }
+       // reset to offset 0 - needed on Plan 9 (see issue #11265)
+       // TODO: remove once issue #11265 has been resolved.
+       _, err = f.Seek(0, 0)
+       if err != nil {
+               return
+       }
 
        var elfreader io.ReaderAt
        switch string(magic[:]) {
index ce0dfb99efa670b373e186cb209de440aba1eefa..4fa01c762c96911e7f88cde5c8b3f4f810a74a77 100644 (file)
@@ -2,10 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Exclude plan9 for now due to test failure with TestGoxImporter.
-// TODO(gri) eliminate this build tag
-// +build !plan9
-
 package gccgoimporter
 
 import (