test/sandbox: invoke check program directly

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-27 03:09:16 +09:00
parent 300571af47
commit 996b42634d
5 changed files with 18 additions and 19 deletions

View File

@@ -34,10 +34,13 @@ type T struct {
MountsPath string
}
func (t *T) MustCheckFile(wantFilePath string) {
func (t *T) MustCheckFile(wantFilePath, markerPath string) {
var want *TestCase
mustDecode(wantFilePath, &want)
t.MustCheck(want)
if _, err := os.Create(markerPath); err != nil {
fatalf("cannot create success marker: %v", err)
}
}
func (t *T) MustCheck(want *TestCase) {