All checks were successful
build-dsl-smoke / Build judge (push) Successful in 16s
build-dsl-smoke / debug / clang / linux (push) Successful in 6s
build-dsl-smoke / debug / gcc / linux (push) Successful in 7s
build-dsl-smoke / release / clang / linux (push) Successful in 8s
build-dsl-smoke / release / gcc / linux (push) Successful in 9s
build-dsl-smoke / sanitized / gcc / linux (push) Successful in 6s
build-dsl-smoke / sanitized / clang / linux (push) Successful in 9s
build-dsl-smoke / debug-valgrind / gcc / linux (push) Successful in 15s
build-dsl-smoke / debug / clang / windows (push) Successful in 15s
build-dsl-smoke / debug / msvc / windows (push) Successful in 19s
build-dsl-smoke / release / clang / windows (push) Successful in 18s
build-dsl-smoke / release / msvc / windows (push) Successful in 18s
build-dsl-smoke / SUMMARY (push) Successful in 4s
- Move Matcher types and matching logic from runner/matcher.go into the dsl package as methods on the Matcher types. Runner now calls t.Stdout.Match(label, actual) instead of type-switching via a package-level applyMatcher helper. - Replace custom contains/containsString helpers with slices.Contains in dsl/build.go and runner/compiler.go. - Use maps.Copy instead of manual map copy in BuildConfig.MergeFrom. - Adopt strings.SplitSeq, strings.CutPrefix and the `for range N` loop form in runner/limiter_linux.go. - Ignore example/imdb build artifact.
79 lines
1.1 KiB
Go
79 lines
1.1 KiB
Go
package dsl
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type File struct {
|
|
Build string
|
|
BuildLinux string
|
|
BuildWindows string
|
|
BuildDarwin string
|
|
|
|
BuildDefaults *BuildConfig
|
|
Builds []*BuildConfig
|
|
Toolchains []*ToolchainSpec
|
|
|
|
Timeout time.Duration
|
|
MemoryLimit int64
|
|
Binary string
|
|
Sources string
|
|
|
|
NormalizeCRLF bool
|
|
TrimTrailingWS bool
|
|
|
|
Groups []*Group
|
|
}
|
|
|
|
type Group struct {
|
|
Name string
|
|
Weight float64
|
|
Timeout time.Duration
|
|
MemoryLimit int64
|
|
Env map[string]string
|
|
Scoring ScoringMode
|
|
Wrapper string
|
|
|
|
Tests []*Test
|
|
Pattern *Pattern
|
|
}
|
|
|
|
type ScoringMode int
|
|
|
|
const (
|
|
ScoringPartial ScoringMode = iota
|
|
ScoringAllOrNone
|
|
)
|
|
|
|
type Pattern struct {
|
|
InputGlob string
|
|
OutputGlob string
|
|
|
|
DirsGlob string
|
|
InputFile string
|
|
OutputFile string
|
|
|
|
Args []string
|
|
}
|
|
|
|
func (p *Pattern) IsDirMode() bool {
|
|
return p.DirsGlob != ""
|
|
}
|
|
|
|
type Test struct {
|
|
Name string
|
|
Timeout time.Duration
|
|
MemoryLimit int64
|
|
Env map[string]string
|
|
Wrapper string
|
|
|
|
Stdin *string
|
|
Args []string
|
|
InFiles map[string]string
|
|
|
|
ExitCode *int
|
|
Stdout Matcher
|
|
Stderr Matcher
|
|
OutFiles map[string]string
|
|
}
|