main: improve support for x86-32 and add tests

To avoid breaking this, make sure we actually test x86-32 (aka i386 aka
GOARCH=386) support in CI.

Also remove the now-unnecessary binutils-arm-none-eabi package to speed
up CI a bit.
This commit is contained in:
Ayke van Laethem
2020-09-23 17:26:43 +02:00
committed by Ron Evans
parent 9a12d129ab
commit 05d2f2c412
3 changed files with 14 additions and 8 deletions
+7 -3
View File
@@ -78,6 +78,9 @@ func TestCompiler(t *testing.T) {
}
if runtime.GOOS == "linux" {
t.Run("X86Linux", func(t *testing.T) {
runPlatTests("i386--linux-gnu", matches, t)
})
t.Run("ARMLinux", func(t *testing.T) {
runPlatTests("arm--linux-gnueabihf", matches, t)
})
@@ -189,10 +192,11 @@ func runTest(path, target string, t *testing.T) {
t.Fatal("failed to load target spec:", err)
}
if len(spec.Emulator) == 0 {
t.Fatal("no emulator available for target:", target)
cmd = exec.Command(binary)
} else {
args := append(spec.Emulator[1:], binary)
cmd = exec.Command(spec.Emulator[0], args...)
}
args := append(spec.Emulator[1:], binary)
cmd = exec.Command(spec.Emulator[0], args...)
}
stdout := &bytes.Buffer{}
cmd.Stdout = stdout