aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/test.go
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-10 18:39:05 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>2015-04-10 18:39:05 +0000
commit4710661ad00b5c9f3bd1b4a81a4634788ea97dae (patch)
tree10f38072ae840828e4205e4f549020643cfeb678 /libgo/go/cmd/go/test.go
parentaa31c12e17c99572dea77ee2976f30eb7a5d3c6b (diff)
parentd5cfbc8c47a002eb0e930e8f991a6035dda18592 (diff)
Merge up to 221977ibm/fusion3
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ibm/fusion3@221980 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/cmd/go/test.go')
-rw-r--r--libgo/go/cmd/go/test.go26
1 files changed, 14 insertions, 12 deletions
diff --git a/libgo/go/cmd/go/test.go b/libgo/go/cmd/go/test.go
index 28b46ff52bf..5cf7aaf0716 100644
--- a/libgo/go/cmd/go/test.go
+++ b/libgo/go/cmd/go/test.go
@@ -384,17 +384,18 @@ func runTest(cmd *Command, args []string) {
delete(deps, "unsafe")
all := []string{}
- if reqPkgSrc {
- for path := range deps {
- if !build.IsLocalImport(path) {
- all = append(all, path)
- }
+ for path := range deps {
+ if !build.IsLocalImport(path) {
+ all = append(all, path)
}
}
sort.Strings(all)
a := &action{}
for _, p := range packagesForBuild(all) {
+ if !reqStdPkgSrc && p.Standard {
+ continue
+ }
a.deps = append(a.deps, b.action(modeInstall, modeInstall, p))
}
b.do(a)
@@ -563,7 +564,7 @@ func (b *builder) test(p *Package) (buildAction, runAction, printAction *action,
stk.push(p.ImportPath + " (test)")
for _, path := range p.TestImports {
p1 := loadImport(path, p.Dir, &stk, p.build.TestImportPos[path])
- if !reqPkgSrc && p1.Root == "" {
+ if !reqStdPkgSrc && p1.Standard {
continue
}
if p1.Error != nil {
@@ -591,7 +592,7 @@ func (b *builder) test(p *Package) (buildAction, runAction, printAction *action,
continue
}
p1 := loadImport(path, p.Dir, &stk, p.build.XTestImportPos[path])
- if !reqPkgSrc && p1.Root == "" {
+ if !reqStdPkgSrc && p1.Standard {
continue
}
if p1.Error != nil {
@@ -691,10 +692,11 @@ func (b *builder) test(p *Package) (buildAction, runAction, printAction *action,
build: &build.Package{
ImportPos: p.build.XTestImportPos,
},
- imports: ximports,
- pkgdir: testDir,
- fake: true,
- Stale: true,
+ imports: ximports,
+ pkgdir: testDir,
+ fake: true,
+ external: true,
+ Stale: true,
}
if pxtestNeedsPtest {
pxtest.imports = append(pxtest.imports, ptest)
@@ -722,7 +724,7 @@ func (b *builder) test(p *Package) (buildAction, runAction, printAction *action,
pmain.imports = append(pmain.imports, ptest)
} else {
p1 := loadImport(dep, "", &stk, nil)
- if !reqPkgSrc && p1.Root == "" {
+ if !reqStdPkgSrc && p1.Standard {
continue
}
if p1.Error != nil {