feat(runner): compile Go and check answers per test group

This commit is contained in:
shira committed 2026-10-11 08:59:29 +03:00
1 parent e95c681165
commit afee564bf4
61 files changed
+2592 -143

No files matched your search

+23 -4
View File
@@ -35,9 +35,14 @@ const (
// Jail paths seen by the jailed program.
const (
// BoxPath is the read-only directory with the files of a run.
// BoxPath is the read-only directory with the source of a program.
BoxPath = "/box"
// ScratchPath is the writable tmpfs and the working directory.
// OutPath holds build output: writable for compile steps, read-only
// for test runs.
OutPath = "/out"
// CheckPath holds the files a custom checker compares, read-only.
CheckPath = "/check"
// ScratchPath is the writable tmpfs and the default working directory.
ScratchPath = "/tmp"
)
@@ -50,6 +55,16 @@ type Limits struct {
WallTime time.Duration
MemoryBytes int64
OutputBytes int64
// FileSizeBytes overrides Config.FileSizeBytes when positive, for
// compile steps that write binaries.
FileSizeBytes int64
}
// Mount is a host directory bound into the jail.
type Mount struct {
Source string
Target string
Writable bool
}
// Spec is one command to run in the jail.
@@ -58,8 +73,12 @@ type Spec struct {
Argv []string
// Stdin is written to the standard input of the command.
Stdin []byte
// BoxDir is the host directory mounted read-only at BoxPath.
BoxDir string
// Mounts are the run's directories, for example a Box.
Mounts []Mount
// Env is added to Config.Env.
Env []string
// WorkDir is the working directory in the jail; empty means ScratchPath.
WorkDir string
}
// Result describes a finished run. It never contains host paths.