aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-07-23 10:01:44 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-07-23 10:01:44 +0200
commitde453f342be9edcca7de5a41e153ced8ad7f1a70 (patch)
treec836ce5429e2e9e1f76e68d56772e904b2d7a1fa /pkg/csource
parent78f30a5156f18a423e1803bc0c0b0688160b8fd0 (diff)
pkg/csource: skip cross-builds that are doomed to fail
OpenBSD instance failed with: --- FAIL: TestSysTests (12.50s) --- FAIL: TestSysTests/linux/386 (0.16s) csource_test.go:145: failed to generate C source for ../../sys/linux/test/binder: cpp failed: exec: "cant-build-linux-on-openbsd": executable file not found in $PATH ... Skip unsupported cross-builds in TestSysTests.
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/csource_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go
index e31347357..64f92d31b 100644
--- a/pkg/csource/csource_test.go
+++ b/pkg/csource/csource_test.go
@@ -117,6 +117,10 @@ func TestSysTests(t *testing.T) {
t.Parallel()
for _, target := range prog.AllTargets() {
target := target
+ sysTarget := targets.Get(target.OS, target.Arch)
+ if runtime.GOOS != sysTarget.BuildOS {
+ continue // we need at least preprocessor binary to generate sources
+ }
t.Run(target.OS+"/"+target.Arch, func(t *testing.T) {
t.Parallel()
dir := filepath.Join("..", "..", "sys", target.OS, "test")