All checks were successful
Test / Create distribution (push) Successful in 1m7s
Test / Sandbox (push) Successful in 2m50s
Test / ShareFS (push) Successful in 3m45s
Test / Hakurei (push) Successful in 3m52s
Test / Sandbox (race detector) (push) Successful in 5m26s
Test / Hakurei (race detector) (push) Successful in 6m30s
Test / Flake checks (push) Successful in 1m17s
The azalea implementation used an adaptation of this as testdata. Signed-off-by: Ophestra <cat@gensokyo.uk>
79 lines
1.7 KiB
Go
79 lines
1.7 KiB
Go
package rosa
|
|
|
|
import (
|
|
"slices"
|
|
"strconv"
|
|
"strings"
|
|
|
|
"hakurei.app/internal/pkg"
|
|
)
|
|
|
|
// skipGNUTests generates a string for skipping specific tests by number in a
|
|
// GNU test suite. This is nontrivial because the test suite does not support
|
|
// excluding tests in any way, so ranges for all but the skipped tests have to
|
|
// be specified instead.
|
|
//
|
|
// For example, to skip test 764, ranges around the skipped test must be
|
|
// specified:
|
|
//
|
|
// 1-763 765-
|
|
//
|
|
// Tests are numbered starting from 1. The resulting string is unquoted.
|
|
func skipGNUTests(tests ...int) string {
|
|
tests = slices.Clone(tests)
|
|
slices.Sort(tests)
|
|
|
|
var buf strings.Builder
|
|
|
|
if tests[0] != 1 {
|
|
buf.WriteString("1-")
|
|
}
|
|
|
|
for i, n := range tests {
|
|
if n != 1 && (i == 0 || tests[i-1] != n-1) {
|
|
buf.WriteString(strconv.Itoa(n - 1))
|
|
buf.WriteString(" ")
|
|
}
|
|
if i == len(tests)-1 || tests[i+1] != n+1 {
|
|
buf.WriteString(strconv.Itoa(n + 1))
|
|
buf.WriteString("-")
|
|
}
|
|
}
|
|
return buf.String()
|
|
}
|
|
|
|
func (t Toolchain) newBison() (pkg.Artifact, string) {
|
|
const (
|
|
version = "3.8.2"
|
|
checksum = "BhRM6K7URj1LNOkIDCFDctSErLS-Xo5d9ba9seg10o6ACrgC1uNhED7CQPgIY29Y"
|
|
)
|
|
return t.NewPackage("bison", version, newTar(
|
|
"https://ftpmirror.gnu.org/gnu/bison/bison-"+version+".tar.gz",
|
|
checksum,
|
|
pkg.TarGzip,
|
|
), nil, &MakeHelper{
|
|
Check: []string{
|
|
"TESTSUITEFLAGS=" + jobsFlagE + "' " + skipGNUTests(
|
|
// clang miscompiles (SIGILL)
|
|
764,
|
|
) + "'",
|
|
"check",
|
|
},
|
|
},
|
|
M4,
|
|
Diffutils,
|
|
Sed,
|
|
), version
|
|
}
|
|
func init() {
|
|
native.MustRegister(&Artifact{
|
|
f: Toolchain.newBison,
|
|
|
|
Name: "bison",
|
|
Description: "a general-purpose parser generator",
|
|
Website: "https://www.gnu.org/software/bison/",
|
|
|
|
ID: 193,
|
|
})
|
|
}
|