Say loudly, not fail, where a check has no bubblewrap to run a build module's shut-off steps (issue 1309)
build-agent's check container has no bwrap; the build nodes, where the checker runs from R4e, do. The sibling test and the real Node build skip naming it, and the pull-head pin test still runs its fetch half and skips only the shut-off build.
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
// member, then both pass, the build with GOPROXY=off.
|
||||
func TestRealFetchAndBuildOfAMemberPinningAPullHead(t *testing.T) {
|
||||
// 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", "bwrap"} { // bwrap: the build runs shut off (1309)
|
||||
for _, tool := range []string{"go", "git"} {
|
||||
if _, err := exec.LookPath(tool); err != nil {
|
||||
t.Fatalf("no %s where this check runs: the pin on a pull request's head cannot be proven", tool)
|
||||
}
|
||||
@@ -50,6 +50,9 @@ func TestRealFetchAndBuildOfAMemberPinningAPullHead(t *testing.T) {
|
||||
if _, err := os.Stat(filepath.Join(m.Work, res.Workspace, "pinned", "dep@"+head, "beside", "dep", "go", "dep.go")); err != nil {
|
||||
t.Errorf("the pull request's repository was not placed beside the workspace: %v", err)
|
||||
}
|
||||
// The build runs shut off in bubblewrap (1309), which a build node has and build-agent's check container has not:
|
||||
// there the build half is not run, said loudly; the fetch half above, the pin's own part (issue 1148), always is.
|
||||
needTools(t, "the shut-off build of a member pinning a pull head", "bwrap")
|
||||
built, err := m.build(context.Background(), map[string]any{"workspace": res.Workspace, "module": ".", "artifact": "tools"})
|
||||
if err != nil {
|
||||
t.Fatal(fmt.Errorf("the build: %w", err))
|
||||
|
||||
@@ -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) {
|
||||
needTools(t, "the shut-off unit level", "go", "git", "bwrap") // the tests run in bubblewrap (1309)
|
||||
f := newForge(t)
|
||||
files := map[string]string{}
|
||||
for _, n := range []string{"go.mod", "beside.go", "beside_test.go"} {
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
// registry for @novox, which reads without a credential) and makes two workspaces holding one fixture bundle.
|
||||
func realMachine(t *testing.T) (*Module, string) {
|
||||
t.Helper()
|
||||
for _, p := range []string{"node", "npm"} {
|
||||
for _, p := range []string{"node", "npm", "bwrap"} { // bwrap: tsc, esbuild and the scripts run shut off (1309)
|
||||
if _, err := exec.LookPath(p); err != nil {
|
||||
t.Skipf("NOT RUN: no %s installed where this check runs (the mesh's Go toolchain image holds none); proven live on a build node", p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user