Skip to content

Commit 0fe4e28

Browse files
authored
test: fix '-f' force option usage with test driver script (#3275)
Normally running '.ci/scripts/test.sh -b rc 18' -- to run tests against a node v18 RC build -- would skip out because the latest RC build is for a version that has an actual release. The '-f' flag exists to allow still testing with that RC, which can be useful for dev work. At some point this was busted, `NODE_FULL_VERSION` wouldn't be set and a build step in ".ci/docker/node-edge-container/Dockerfile" would fail (the `nvm install $NODE_FULL_VERSION`).
1 parent ea40208 commit 0fe4e28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.ci/scripts/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ set -o xtrace
140140

141141
# ---- For nightly and rc builds, determine if there is a point in testing.
142142

143-
if [[ $BUILD_TYPE != "release" && $FORCE != "true" ]]; then
143+
if [[ $BUILD_TYPE != "release" ]]; then
144144
# If there is no nightly/rc build for this version, then skip.
145145
#
146146
# Note: We are relying on new releases being added to the top of index.tab,
@@ -165,7 +165,7 @@ if [[ $BUILD_TYPE != "release" && $FORCE != "true" ]]; then
165165
possible_release_version=${edge_node_version%-*} # remove "-*" suffix
166166
release_version=$(curl -sS https://nodejs.org/dist/index.tab \
167167
| (grep -E "^${possible_release_version}\>" || true) | awk '{print $1}')
168-
if [[ -n "$release_version" ]]; then
168+
if [[ -n "$release_version" && $FORCE != "true" ]]; then
169169
skip "There is already a release build (${release_version}) of the latest v${NODE_VERSION} ${BUILD_TYPE} (${edge_node_version}). Skipping tests."
170170
fi
171171

0 commit comments

Comments
 (0)