diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-10-01 22:34:51 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-10-02 19:05:34 +0900 |
| commit | e332ef1e2549eaa6702d07fac77d9ad206bf4f4c (patch) | |
| tree | a5dbcd8bd1649da392869539c95c9ba6ae1a2919 /internal/workflows/test.go | |
| parent | 4b19686109b0962ea68dfe58feafffe3bac9c202 (diff) | |
test/sandbox: migrate tests
This benefits even more than the cmd/sharefs test suite, the slow
python-based test script was a major bottleneck. Replacing the
nix-represented test cases with compound literals also significantly
increases readability.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/workflows/test.go')
| -rw-r--r-- | internal/workflows/test.go | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/internal/workflows/test.go b/internal/workflows/test.go index d3290f16..85ac5c62 100644 --- a/internal/workflows/test.go +++ b/internal/workflows/test.go @@ -31,23 +31,31 @@ var _ = (&Workflow{ {"sandbox", Job{ Name: "Sandbox", - On: "nix", + On: "rosa", Steps: []Step{ + fixup, checkout, - newNixOSTest("sandbox"), - newUploadArtifact("test output", "sandbox-vm-output"), + toolchain, + + newCIRequest("distribution", "dist -o result", "dist"), + install, + newTestsuite("sandbox", ""), }, }}, {"sandbox-race", Job{ - Name: "Sandbox (race detector)", - On: "nix", + Name: "Sandbox (with race instrument)", + On: "rosa", Steps: []Step{ + fixup, checkout, - newNixOSTest("sandbox-race"), - newUploadArtifact("test output", "sandbox-race-vm-output"), + toolchain, + + newCIRequest("distribution", "race -o result", "dist"), + install, + newTestsuite("sandbox", ""), }, }}, @@ -82,12 +90,7 @@ var _ = (&Workflow{ "setuid=1023,setgid=1023 /sdcard", }, - { - Name: "Compile and run test suite", - Run: "sharefs -V && rm -rf result && " + - "go run -tags=testsuite ./test/sharefs ubuntu", - }, - + newTestsuite("sharefs", "sharefs -V && "), newUploadArtifact("test output", "fs_mark"), }, }}, @@ -99,8 +102,6 @@ var _ = (&Workflow{ Needs: []string{ "hakurei", "race", - "sandbox", - "sandbox-race", }, Steps: []Step{ |
