From 9ed13cd9dcd445f36aa131a491a3008c478af042 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 17 Nov 2026 15:10:51 +0100 Subject: [PATCH 1/3] mesh-build-go: the empty buildstep bridge goes (G's indexer runs), and the unit level runs its digest tests side by side MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bridge kept a directory for the pre-G indexer's package publishing; its own commit says it goes once G's indexer runs, and the test of the delivery SDK's step code refuses it. The unit level took 6.3 s over its bound of 5 s in the take-in's pipeline: the digest tests ran their go commands one after another; the marker table is a subtest per case in a fixture of its own, the list half a test of its own, and the six slowest independent tests run in parallel (4.6 s locally). Builds: design 47 G §464, §680 (the build modules keep no copy of the delivery SDK step code); ADR 0445 §3 (the unit level's 5 s bound) --- modules/mesh-build-go/buildstep/doc.go | 3 -- .../cmd/mesh-build-go/candidate_test.go | 2 + .../cmd/mesh-build-go/digest_test.go | 48 ++++++++++++++----- .../cmd/mesh-build-go/isolate_test.go | 1 + .../cmd/mesh-build-go/mirror_test.go | 1 + .../cmd/mesh-build-go/pins_test.go | 1 + .../cmd/mesh-build-go/versions_test.go | 1 + 7 files changed, 43 insertions(+), 14 deletions(-) delete mode 100644 modules/mesh-build-go/buildstep/doc.go diff --git a/modules/mesh-build-go/buildstep/doc.go b/modules/mesh-build-go/buildstep/doc.go deleted file mode 100644 index 5d5470d20..000000000 --- a/modules/mesh-build-go/buildstep/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package buildstep is kept empty as a bridge: the running pre-G indexer publishes mesh-catalog's packages only while -// every package directory it published before is in the tree. It goes once G's indexer runs. -package buildstep diff --git a/modules/mesh-build-go/cmd/mesh-build-go/candidate_test.go b/modules/mesh-build-go/cmd/mesh-build-go/candidate_test.go index b2b0c44dd..188a84b0a 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/candidate_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/candidate_test.go @@ -195,6 +195,7 @@ func TestACandidateThatDoesNotCompileFailsTheStepWithTheCompilersFirstErrorAndRu } func TestTheInstalledProgramSaysItJudged(t *testing.T) { // 1898 K1, ADR 0535 §5 + t.Parallel() m, states, ws, _ := workspaceFor(t, "slow") for _, runner := range []any{nil, RunnerInstalled} { args := map[string]any{"workspace": ws, "level": LevelUnit} @@ -223,6 +224,7 @@ func TestAnUnknownRunnerIsRefused(t *testing.T) { // 1898 K1 } func TestTheShutOffProcessRunsTheStepItIsAsked(t *testing.T) { // 1898 K2: the candidate's side of the spec + t.Parallel() m, _, ws, calls := workspaceFor(t, "slow") m.Inside = true a := m.answer(context.Background(), levelSpec{Step: stepUnit, Workspace: ws, Packages: []string{"./..."}, Bound: UnitBound}) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/digest_test.go b/modules/mesh-build-go/cmd/mesh-build-go/digest_test.go index 689ff100e..df2fbb19d 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/digest_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/digest_test.go @@ -273,6 +273,7 @@ func TestAPackageWithTheReadsOutsideMarkerIsKeptOnlyByWhatItLists(t *testing.T) } edit(t, tree, "docs/one.md", "one\n") edit(t, tree, "other.md", "other\n") + // Each marker is judged in a fixture of its own, side by side: the digests are go commands, and the table is the test's longest part. for name, marker := range map[string]string{ "an empty marker": "# nothing listed\n\n", "a sentence": "the tests read ../docs\n", @@ -282,19 +283,44 @@ func TestAPackageWithTheReadsOutsideMarkerIsKeptOnlyByWhatItLists(t *testing.T) "a path that is not clean": "docs/./one.md\n", "a good line and a bad line": "docs\nnope/*.md\n", } { - edit(t, tree, "c/"+ReadsOutsideMarker, marker) - first, second := digests(t, m, "unit"), digests(t, m, "unit") - if len(first.Packages[c]) != 64 || first.Packages[c] == second.Packages[c] || first.Packages[c] == plain.Packages[c] { - t.Errorf("%s: c's digest is stable: %s, %s, before %s", name, first.Packages[c], second.Packages[c], plain.Packages[c]) - } - if strings.Join(first.ReadsOutside, ",") != c { - t.Errorf("%s: the answer does not name the package that reads outside: %v", name, first.ReadsOutside) - } - if first.Packages[a] != plain.Packages[a] || first.Packages[a] != second.Packages[a] { - t.Errorf("%s: a has no marker and its digest moved: %s, %s, before %s", name, first.Packages[a], second.Packages[a], plain.Packages[a]) - } + t.Run(name, func(t *testing.T) { + t.Parallel() + m, tree := digestFixture(t) + plain := digests(t, m, "unit") + if err := os.MkdirAll(filepath.Join(tree, "docs"), 0o755); err != nil { + t.Fatal(err) + } + edit(t, tree, "docs/one.md", "one\n") + edit(t, tree, "other.md", "other\n") + edit(t, tree, "c/"+ReadsOutsideMarker, marker) + first, second := digests(t, m, "unit"), digests(t, m, "unit") + if len(first.Packages[c]) != 64 || first.Packages[c] == second.Packages[c] || first.Packages[c] == plain.Packages[c] { + t.Errorf("%s: c's digest is stable: %s, %s, before %s", name, first.Packages[c], second.Packages[c], plain.Packages[c]) + } + if strings.Join(first.ReadsOutside, ",") != c { + t.Errorf("%s: the answer does not name the package that reads outside: %v", name, first.ReadsOutside) + } + if first.Packages[a] != plain.Packages[a] || first.Packages[a] != second.Packages[a] { + t.Errorf("%s: a has no marker and its digest moved: %s, %s, before %s", name, first.Packages[a], second.Packages[a], plain.Packages[a]) + } + }) } +} + +// The marker that lists what the package's tests read, and the marker of what the package needs (issue 890/AC3): in a fixture of its +// own, so it runs beside the table above. +func TestAListedReadsOutsideMarkerKeepsTheDigestOfOnlyWhatItLists(t *testing.T) { + t.Parallel() + m, tree := digestFixture(t) + plain := digests(t, m, "unit") + c, a := "fixture/digest/c", "fixture/digest/a" + if err := os.MkdirAll(filepath.Join(tree, "docs"), 0o755); err != nil { + t.Fatal(err) + } + edit(t, tree, "docs/one.md", "one\n") + edit(t, tree, "other.md", "other\n") + // A list: a glob, a directory read whole, and a path whose absence is read. edit(t, tree, "c/"+ReadsOutsideMarker, "# what c's tests read\ndocs/*.md\ndocs\n?gone\n") before := digests(t, m, "unit") diff --git a/modules/mesh-build-go/cmd/mesh-build-go/isolate_test.go b/modules/mesh-build-go/cmd/mesh-build-go/isolate_test.go index b63e4ac4a..4ef09ae75 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/isolate_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/isolate_test.go @@ -186,6 +186,7 @@ func TestABuildRunsShutOffAndOnlyATrunkBuildWritesTheCaches(t *testing.T) { // 1309-S3: the digest's go list runs shut off. func TestTheDigestListsPackagesShutOff(t *testing.T) { + t.Parallel() m, _ := digestFixture(t) var seen []shutOff m.Run = throughBubblewrap(t, m.Run, &seen) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/mirror_test.go b/modules/mesh-build-go/cmd/mesh-build-go/mirror_test.go index a71ca19f0..72b3bac2e 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/mirror_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/mirror_test.go @@ -158,6 +158,7 @@ func sleepABit() { time.Sleep(30 * time.Millisecond) } // The workspace is self-contained after the fetch: no alternates file, and git finds the commit with the mirror gone, // as a step shut off with the workspace alone needs. Real git, a local repository as the forge. func TestTheWorkspaceIsSelfContainedAfterAFetchThroughTheMirror(t *testing.T) { + t.Parallel() if _, err := exec.LookPath("git"); err != nil { t.Skip("no git") } diff --git a/modules/mesh-build-go/cmd/mesh-build-go/pins_test.go b/modules/mesh-build-go/cmd/mesh-build-go/pins_test.go index 5b957bc42..8d16b996f 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/pins_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/pins_test.go @@ -304,6 +304,7 @@ func TestARelativeReplaceStillResolvesInTheTemporaryModfile(t *testing.T) { // the asked versions, else from the trunk's latest published version, and never looked for as the commit 000000000000 // among the pull request heads. func TestARequirementAtTheZeroVersionIsTakenFromTheAskOrTheTrunk(t *testing.T) { + t.Parallel() const sdk = "git.novox.be/novox/mesh-sdk/go" zeroMod := "module fixture/member\n\ngo 1.26\n\nrequire (\n\t" + sdk + " v0.0.0-00010101000000-" + zeroShort + "\n)\n" trunk := strings.Repeat("a", 40) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/versions_test.go b/modules/mesh-build-go/cmd/mesh-build-go/versions_test.go index 0e591987d..cabcbe84d 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/versions_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/versions_test.go @@ -19,6 +19,7 @@ import ( // group's head Go cannot fetch is placed from the forge's pull request heads; a go.mod that does not require the package // takes nothing. func TestAnAskedVersionIsWrittenIntoTheModfileWhateverGoModNames(t *testing.T) { + t.Parallel() const sdk = "git.novox.be/novox/mesh-sdk/go" trunk := strings.Repeat("a", 40) offHead := strings.Repeat("b", 40) // a commit no pull request's head carries -- 2.54.0 From 84106a933889970604659b8149cd263339cb8cad Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 17 Nov 2026 15:13:56 +0100 Subject: [PATCH 2/3] mesh-build-go: the compose ask's test builds a stand-in composer from its own testdata, reading no other repository A pipeline's test step places no repository beside the tree and a module's tests read nothing outside their module (lead answer A-474), so the test no longer needs MESH_CHECK_BESIDE or the node-engine's tree: it fetches a small program of the composer's contract (testdata/composer) and still proves the build once, the kept composer on the second ask, and the verdict by case. Builds: design 47 G lead answer A-474 (principles 10 and 9) --- .../mesh-build-go/compose_integration_test.go | 92 ++----------------- .../composer/cmd/mesh-compose/main.go | 44 +++++++++ .../mesh-build-go/testdata/composer/go.mod | 3 + 3 files changed, 54 insertions(+), 85 deletions(-) create mode 100644 modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/cmd/mesh-compose/main.go create mode 100644 modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/go.mod diff --git a/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go index c1bf03f98..f47cd194c 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/compose_integration_test.go @@ -24,70 +24,7 @@ import ( "git.novox.be/novox/mesh-sdk/go/testbus" ) -// nodeEngineTree is the node-engine's repository as the checker places it beside this check (MESH_CHECK_BESIDE, the -// repository mesh-host), and with it every Go module of the other repositories placed there (mesh-sdk, mesh-contracts, -// mesh-delivery, mesh-networking, the catalogue's trunk) and of the catalogue under check, first, as candidates: the workspace lays those the -// node-engine's composer requires at the zero version, transitively (workspaceOf), so they resolve as the group lays -// them, wherever the composer lives. The test -// builds the node-engine's real composer command from that tree; it does not stand one in. With no beside directory it -// fails, and with the node-engine beside but no composer command in it it fails: a composer test that could not build its -// composer proves nothing. With a beside directory that holds no node-engine at all it skips aloud (NOT JUDGED), since a -// checker from before this release places none for the catalogue. -func nodeEngineTree(t *testing.T) (tree string, modules []string) { - t.Helper() - beside := os.Getenv("MESH_CHECK_BESIDE") - if beside == "" { - t.Fatal("NOT CHECKED: MESH_CHECK_BESIDE is not set, so the node-engine's repository (mesh-host) is not beside this check") - } - tree = filepath.Join(beside, "mesh-host") - if !dirExists(tree) { - // A checker from before novox/hq ADR 0593 places only mesh-sdk beside a catalogue check, so the node-engine's - // repository is absent, not wrong: said aloud, since nothing here could build a composer to judge. - t.Skipf("NOT JUDGED: the node-engine's repository (mesh-host) is not beside this check in MESH_CHECK_BESIDE=%s; the running checker places none for the catalogue, so the composer is judged only once it does", beside) - } - if _, err := os.Stat(filepath.Join(tree, "cmd", "mesh-compose")); err != nil { - t.Fatalf("NOT CHECKED: the node-engine's composer command is not beside this check in MESH_CHECK_BESIDE=%s: %v", beside, err) - } - entries, err := os.ReadDir(beside) - if err != nil { - t.Fatal(err) - } - var roots []string - for _, e := range entries { - if e.Name() == "mesh-host" || !dirExists(filepath.Join(beside, e.Name())) { - continue - } - root, err := filepath.EvalSymlinks(filepath.Join(beside, e.Name())) - if err != nil { - t.Fatal(err) - } - roots = append(roots, root) - } - // The catalogue under check, first: beside lies its trunk (issue 1295), whose modules a head's must win over. - catalogue, err := filepath.Abs(filepath.Join("..", "..", "..", "..")) - if err != nil { - t.Fatal(err) - } - for _, root := range append([]string{catalogue}, roots...) { - filepath.WalkDir(root, func(p string, d fs.DirEntry, err error) error { - if err != nil { - return nil - } - if d.IsDir() && (d.Name() == ".git" || d.Name() == "testdata" || d.Name() == "node_modules") { - return filepath.SkipDir - } - if !d.IsDir() && d.Name() == "go.mod" { - modules = append(modules, filepath.Dir(p)) - } - return nil - }) - } - return tree, modules -} - -func dirExists(p string) bool { st, err := os.Stat(p); return err == nil && st.IsDir() } - -// copyTree copies the files of a source tree into dst, leaving out its .git. +// copyHostTree copies the files of a source tree into dst, leaving out its .git. func copyHostTree(t *testing.T, src, dst string) { t.Helper() src, err := filepath.EvalSymlinks(src) @@ -130,7 +67,7 @@ func goEnvOf(t *testing.T, name string) string { } // 1622/AC1, AC3 against the real bus (ADR 0593 §7, C9): a compose ask put on the Go build seat's check stream is pulled by -// the module started whole on that bus, which fetches the commit (the node-engine's repository beside the check, its Go module at the root), builds the composer command the ask names there with nothing fetched, fills the +// the module started whole on that bus, which fetches the commit (a stand-in composer of this module's testdata, its Go module at the root), builds the composer command the ask names there with nothing fetched, fills the // request's manifests from the indexer's state and runs the composer; the step key . passes with the // composer's verdict. A second ask of the same commit runs the kept composer: fetched and built once. func TestAComposeAskIsBuiltOnceAndAnsweredOnTheBus(t *testing.T) { @@ -157,14 +94,11 @@ func TestAComposeAskIsBuiltOnceAndAnsweredOnTheBus(t *testing.T) { m.Run = StepRunner(t.TempDir()) m.GoModCache = goEnvOf(t, "GOMODCACHE") // the module cache this module's own build filled, read and not fetched run, gocache := m.Run, goEnvOf(t, "GOCACHE") // this machine's build cache, so the composer's packages compile once - hostTree, beside := nodeEngineTree(t) - workFile := "" + // The composer is a stand-in of this module's own testdata (design 47 G A-474: a module's tests read nothing outside it, and a + // pipeline's step places no other repository beside the tree): a program of the composer's contract that imports nothing. + hostTree := filepath.Join("testdata", "composer") m.Run = func(ctx context.Context, env []string, name string, args ...string) forgekey.Ran { - env = append(env, "GOCACHE="+gocache) - if workFile != "" { - env = append(env, "GOWORK="+workFile, "GOFLAGS=-mod=readonly") // a workspace takes no -mod=mod - } - return run(ctx, env, name, args...) + return run(ctx, append(env, "GOCACHE="+gocache), name, args...) } read, digests := catalogHolds(t, `{"module":"demo","version":"1"}`) m.ReadEntry = read @@ -181,18 +115,6 @@ func TestAComposeAskIsBuiltOnceAndAnsweredOnTheBus(t *testing.T) { return nil, err } copyHostTree(t, hostTree, tree) - if len(beside) > 0 { // the group's other repositories, laid beside the node-engine's tree as one workspace - work, err := workspaceOf(tree, beside) - if err != nil { - return nil, err - } - if err := os.WriteFile(filepath.Join(m.Work, ws, "go.work"), []byte(work), 0o600); err != nil { - return nil, err - } - workFile = filepath.Join(m.Work, ws, "go.work") - // Nothing is downloaded here: this level has no network. The check's own fetch downloaded this workspace's - // graph (downloadBeside), and a module it lacks fails the build naming it. - } return map[string]any{"workspace": ws}, nil } } @@ -203,7 +125,7 @@ func TestAComposeAskIsBuiltOnceAndAnsweredOnTheBus(t *testing.T) { ask := func() sdkstep.Step { a := composeAskOf(t, digests[0]) - a.Compose.Fetch.Repository, a.Compose.Dir, a.Compose.Package = "novox/mesh-host", catalogclient.RootPath, "github.com/novox/mesh-host/cmd/mesh-compose" + a.Compose.Fetch.Repository, a.Compose.Dir, a.Compose.Package = "novox/mesh-catalog", catalogclient.RootPath, "standin/cmd/mesh-compose" raw, err := sdkstep.EncodeStepAsk(a) if err != nil { t.Fatal(err) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/cmd/mesh-compose/main.go b/modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/cmd/mesh-compose/main.go new file mode 100644 index 000000000..2bc0623bd --- /dev/null +++ b/modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/cmd/mesh-compose/main.go @@ -0,0 +1,44 @@ +// Command mesh-compose is the stand-in composer the compose ask's test builds: a program of the contract the Go build module +// runs (`-request `, the last line of its standard output a composer verdict of version 1), which judges nothing and +// answers each case of the request by its name, with no manifest and no machine. It imports nothing of the mesh. +package main + +import ( + "encoding/json" + "flag" + "fmt" + "os" +) + +func main() { + file := flag.String("request", "", "the request file") + flag.Parse() + raw, err := os.ReadFile(*file) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + var req struct { + Cases []struct { + Name string `json:"name"` + } `json:"cases"` + } + if err := json.Unmarshal(raw, &req); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + type verdict struct { + Name string `json:"name"` + Manifests map[string]any `json:"manifests"` + } + out := struct { + V int `json:"v"` + SDK string `json:"sdk"` + Cases []verdict `json:"cases"` + }{V: 1, SDK: "stand-in"} + for _, c := range req.Cases { + out.Cases = append(out.Cases, verdict{Name: c.Name, Manifests: map[string]any{}}) + } + line, _ := json.Marshal(out) + fmt.Println(string(line)) +} diff --git a/modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/go.mod b/modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/go.mod new file mode 100644 index 000000000..31acfdbb0 --- /dev/null +++ b/modules/mesh-build-go/cmd/mesh-build-go/testdata/composer/go.mod @@ -0,0 +1,3 @@ +module standin + +go 1.26 -- 2.54.0 From eed95cd63be8791c994fcaf4cb13120938f75bc0 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 17 Nov 2026 15:30:54 +0100 Subject: [PATCH 3/3] mesh-build-go: the integration level runs its slowest independent tests side by side, inside its 60 s bound MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The level took 67 s locally and 74 s in the pipeline, over IntegrationRun's 60 s. The eight slowest tests share no state and run in parallel: 31 s locally with the fixture's store and bus. The real-store test makes its work directory under the test temp directory, not /tmp. Builds: ADR 0445 §3 (the integration level's 60 s bound) --- .../cmd/mesh-build-go/candidate_integration_test.go | 1 + .../cmd/mesh-build-go/isolation_integration_test.go | 1 + .../mesh-build-go/cmd/mesh-build-go/pins_integration_test.go | 1 + .../cmd/mesh-build-go/preview_integration_test.go | 1 + .../cmd/mesh-build-go/store_integration_test.go | 1 + .../cmd/mesh-build-go/test_real_integration_test.go | 5 ++++- 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/candidate_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/candidate_integration_test.go index fe6dc2800..f8bd00fc2 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/candidate_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/candidate_integration_test.go @@ -58,6 +58,7 @@ func main() { // compiles that program and runs it shut off, answers its mark judged by the candidate at the tree's commit, and the // program reached no key, no login, no name and no socket of the machine. func TestTheUnitLevelUnderTheWorkspaceRunnerRunsTheTreesProgramShutOff(t *testing.T) { + t.Parallel() needTools(t, "the candidate's program shut off", "go", "git", "bwrap") home := t.TempDir() key, login := filepath.Join(home, ".ssh", "mesh_ed25519"), filepath.Join(home, "broker") diff --git a/modules/mesh-build-go/cmd/mesh-build-go/isolation_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/isolation_integration_test.go index 457d6b524..d09a001fe 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/isolation_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/isolation_integration_test.go @@ -15,6 +15,7 @@ import ( // resolves no name, reaches no socket of the machine (a TCP port on its loopback, a unix socket) and leaves the shared // caches unchanged. The probe is testdata/repos/probe. func TestARunStepReachesNoKeyLoginNameOrSocketAndLeavesTheCachesUnchanged(t *testing.T) { + t.Parallel() needTools(t, "the shut-off unit level", "go", "git", "bwrap") tree := repository(t, "probe") work, err := os.MkdirTemp("", "w") diff --git a/modules/mesh-build-go/cmd/mesh-build-go/pins_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/pins_integration_test.go index 6337ed1f8..1e2e79b36 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/pins_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/pins_integration_test.go @@ -21,6 +21,7 @@ import ( // build_go_fetch is asked that head as the package's version and build_go_build runs on the member, then both pass, the // build with GOPROXY=off against the head: the older commit holds no Go package at all. func TestRealFetchAndBuildOfAMemberAskedAPullHeadItsGoModDoesNotName(t *testing.T) { + t.Parallel() // Not skipped when a tool is missing: a pass of the check must mean this test ran (the check prints no test log). for _, tool := range []string{"go", "git"} { if _, err := exec.LookPath(tool); err != nil { diff --git a/modules/mesh-build-go/cmd/mesh-build-go/preview_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/preview_integration_test.go index 7a69a5779..2d84225e7 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/preview_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/preview_integration_test.go @@ -171,6 +171,7 @@ func TestRealFetchMergesConflictsAndPlainlyFetches(t *testing.T) { // sibling and passes with it; the sibling is a plain directory with no symlink in it; and a sibling that holds a // symlink fails the fetch naming it. func TestRealTestsReadTheSiblingBesideTheTree(t *testing.T) { + t.Parallel() needTools(t, "the shut-off unit level", "go", "git", "bwrap") // the tests run in bubblewrap (1309) f := newForge(t) files := map[string]string{} diff --git a/modules/mesh-build-go/cmd/mesh-build-go/store_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/store_integration_test.go index f69b58619..f33613e2d 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/store_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/store_integration_test.go @@ -118,6 +118,7 @@ func resolve(t *testing.T, addr string, a builds.BuiltArtifact) []byte { // reference resolves in a real artifact store to bytes of that digest. The build is the real go's, shut off, of the // fixture testdata/repos/build, with an archive beside its bundle. func TestADoneBuildsArtifactsResolveInARealArtifactStore(t *testing.T) { + t.Parallel() needTools(t, "the build", "go", "bwrap") work := t.TempDir() tree := filepath.Join(work, "ws1", "tree") diff --git a/modules/mesh-build-go/cmd/mesh-build-go/test_real_integration_test.go b/modules/mesh-build-go/cmd/mesh-build-go/test_real_integration_test.go index 1e14fc7fd..7645d90bb 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/test_real_integration_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/test_real_integration_test.go @@ -62,6 +62,7 @@ func repository(t *testing.T, name string) string { // test_test.go read the output captured from them, and this one proves the capture is what the real go says today. It // starts go test, so it carries the tag. func TestUnitLevelRunsTheRealGoOnTheFixtureRepositories(t *testing.T) { + t.Parallel() needTools(t, "the unit level on fixtures", "go", "git", "bwrap") want := map[string]struct { passed, noTests bool @@ -104,6 +105,7 @@ func TestUnitLevelRunsTheRealGoOnTheFixtureRepositories(t *testing.T) { // 086 A-C3 against the real go (design 47 line 571 at b229f5c4): a tree holding an unformatted file passes its unit // level, its two tests run, and the lint step's body fails naming the file. func TestAnUnformattedFileFailsTheRealLintStepAndNotTheUnitLevel(t *testing.T) { + t.Parallel() needTools(t, "the unit level's gofmt and vet", "go", "git", "bwrap") home := t.TempDir() m := &Module{Home: home, Work: t.TempDir(), Cache: t.TempDir()} @@ -150,7 +152,7 @@ func TestIntegrationLevelRunsAgainstARealStoreAndBusAndLeavesNothing(t *testing. needTools(t, "the integration level", "go", "git", "initdb", "pg_ctl", "postgres", "bwrap") tree := repository(t, "store") // A short work directory: a unix socket's path is bounded at 108 bytes. - work, err := os.MkdirTemp("/tmp", "w") + work, err := os.MkdirTemp(os.TempDir(), "w") if err != nil { t.Fatal(err) } @@ -185,6 +187,7 @@ func TestIntegrationLevelRunsAgainstARealStoreAndBusAndLeavesNothing(t *testing. // 1487/AC2: given a fixture Go module, when it is built twice, both digests are equal and the archive holds one // executable named as binaryName says. It runs the real go, so it carries the tag. func TestBuildTwiceGivesOneDigestAndOneExecutable(t *testing.T) { + t.Parallel() needTools(t, "the build", "go", "bwrap") work := t.TempDir() tree := filepath.Join(work, "ws1", "tree") -- 2.54.0