Skip to content

Commit 5cd913d

Browse files
committed
internal/relui: update test's failing builder skip for Go 1.21
The "js-wasm" builder runs on Go 1.20 and older, so it failing and being skipped during TestRelease was an elaborate no-op. It only had effect in TestNonDistpack that still tests the 1.20 release branch. Match the all.bash failure by GOOS rather than builder name, that should be less brittle. Change-Id: I762ef4cb43c4630bcda26f5d4c09e2d9f6ef9499 Reviewed-on: https://go-review.googlesource.com/c/build/+/504526 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> TryBot-Bypass: Dmitri Shuralyov <[email protected]>
1 parent b1d80c4 commit 5cd913d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

internal/relui/buildrelease_test.go

+9-4
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,12 @@ func testRelease(t *testing.T, prevTag string, major int, wantVersion string, ki
255255
workflow.Output(wd, "Published Go version", v)
256256

257257
w, err := workflow.Start(wd, map[string]interface{}{
258-
"Targets to skip testing (or 'all') (optional)": []string{"js-wasm"},
258+
"Targets to skip testing (or 'all') (optional)": []string{
259+
// allScript is intentionally hardcoded to fail on GOOS=js
260+
// and we confirm here that it's possible to skip that.
261+
"js-wasm-node18", // Builder used on 1.21 and newer.
262+
"js-wasm", // Builder used on 1.20 and older.
263+
},
259264
"Ref from the private repository to build from (optional)": "",
260265
})
261266
if err != nil {
@@ -557,13 +562,13 @@ fi
557562
`
558563

559564
// allScript pretends to be all.bash. It's hardcoded
560-
// to fail on js-wasm and pass on all other builders.
565+
// to fail on GOOS=js and pass on all other builders.
561566
const allScript = `#!/bin/bash -eu
562567
563568
echo "I'm a test! :D"
564569
565-
if [[ $GO_BUILDER_NAME = "js-wasm" ]]; then
566-
echo "Oh no, WASM is broken"
570+
if [[ ${GOOS:-} = "js" ]]; then
571+
echo "Oh no, JavaScript is broken."
567572
exit 1
568573
fi
569574

0 commit comments

Comments
 (0)