Skip to content

build: don't run tests when cross-compiling #6172

@josharian

Description

@josharian
What steps will reproduce the problem?

1. Set env variables to trigger cross-compilation.
2. Run all.bash to build.


What is the expected output?

With lots of irrelevant lines snipped out:

# Building packages and commands for host, darwin/amd64.
# Building packages and commands for linux/arm.
# Skipping cross-compiled package tests


What do you see instead?

# Building packages and commands for host, darwin/amd64.
# Building packages and commands for linux/arm.
# Testing packages.
fork/exec
/var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm09k844/T/go-build072828287/cmd/fix/_test/fix.test:
exec format error
FAIL    cmd/fix 0.007s
fork/exec
/var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm09k844/T/go-build072828287/cmd/go/_test/go.test:
exec format error
FAIL    cmd/go  0.006s
fork/exec
/var/folders/jw/xrvq7wz95p5bwvjyx9yc2npm09k844/T/go-build072828287/cmd/gofmt/_test/gofmt.test:
exec format error
FAIL    cmd/gofmt   0.004s

and lots more FAILs. There's no point in trying to run tests that are guaranteed to
fail; it's just noise.


Which version are you using?  (run 'go version')

Tip as of filing this issue: go version devel +49d897ab8e2f Fri Aug 16 22:42:54 2013
+0400 darwin/amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions