pkg/runtest: enable 32-bit tests

32-bit tests should work on CI now.
But don't run them in -short mode,
otherwise it takes too long.
This commit is contained in:
Dmitry Vyukov 2020-05-16 14:01:04 +02:00
parent 672c10ad7c
commit 67206203d3

View File

@ -21,7 +21,12 @@ func Test(t *testing.T) {
case "openbsd":
t.Skipf("broken on %v", runtime.GOOS)
}
// Test only one target in short mode (each takes 5+ seconds to run).
shortTarget := targets.Get("test", "64")
for _, sysTarget := range targets.List["test"] {
if testing.Short() && sysTarget != shortTarget {
continue
}
sysTarget1 := targets.Get(sysTarget.OS, sysTarget.Arch)
t.Run(sysTarget1.Arch, func(t *testing.T) {
t.Parallel()
@ -35,10 +40,6 @@ func test(t *testing.T, sysTarget *targets.Target) {
if err != nil {
t.Fatal(err)
}
if testing.Short() && target.PtrSize == 4 {
// Building 32-bit binaries fails on travis (see comments in Makefile).
t.Skip("skipping in short mode")
}
executor, err := csource.BuildFile(target, filepath.FromSlash("../../executor/executor.cc"))
if err != nil {
t.Fatal(err)