add memory limit
This commit is contained in:
23
dsl/ast.go
23
dsl/ast.go
@@ -8,6 +8,7 @@ type File struct {
|
||||
BuildWindows string
|
||||
BuildDarwin string
|
||||
Timeout time.Duration
|
||||
MemoryLimit int64 // bytes; 0 means no limit
|
||||
Binary string // executable name produced by build (default: solution)
|
||||
Sources string // glob pattern for source files, expanded as $SOURCES in build
|
||||
|
||||
@@ -18,12 +19,13 @@ type File struct {
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
Name string
|
||||
Weight float64
|
||||
Timeout time.Duration
|
||||
Env map[string]string
|
||||
Scoring ScoringMode
|
||||
Wrapper string // exec wrapper command (e.g., "valgrind --error-exitcode=1")
|
||||
Name string
|
||||
Weight float64
|
||||
Timeout time.Duration
|
||||
MemoryLimit int64
|
||||
Env map[string]string
|
||||
Scoring ScoringMode
|
||||
Wrapper string // exec wrapper command (e.g., "valgrind --error-exitcode=1")
|
||||
|
||||
Tests []*Test
|
||||
Pattern *Pattern
|
||||
@@ -50,10 +52,11 @@ func (p *Pattern) IsDirMode() bool {
|
||||
}
|
||||
|
||||
type Test struct {
|
||||
Name string
|
||||
Timeout time.Duration
|
||||
Env map[string]string
|
||||
Wrapper string
|
||||
Name string
|
||||
Timeout time.Duration
|
||||
MemoryLimit int64
|
||||
Env map[string]string
|
||||
Wrapper string
|
||||
|
||||
Stdin *string
|
||||
Args []string
|
||||
|
||||
Reference in New Issue
Block a user