fix: lake: noRelease test flakiness (#13786)
This PR fixes flaky output checks in Lake's `tests/noRelease`.
This commit is contained in:
parent
1f23107ad9
commit
727b4aad2b
1 changed files with 9 additions and 6 deletions
|
|
@ -42,23 +42,26 @@ test_status $NO_BUILD_CODE build dep:release -v --no-build
|
||||||
test_cmd git -C .lake/packages/dep tag -d release
|
test_cmd git -C .lake/packages/dep tag -d release
|
||||||
|
|
||||||
# Test that a direct invocation of `lake build *:release` fails
|
# Test that a direct invocation of `lake build *:release` fails
|
||||||
|
diff_out() {
|
||||||
|
sed "/$1/ s/^[^${1:0:1}]*//" | diff -u --strip-trailing-cr $2 -
|
||||||
|
}
|
||||||
echo "# TEST: Direct fetch"
|
echo "# TEST: Direct fetch"
|
||||||
test_err_diff <(cat << EOF
|
($LAKE build dep:release 2>&1 && exit 1 || true) | diff_out "Running" <(cat << 'EOF'
|
||||||
✖ [2/2] Running dep:release
|
Running dep:release
|
||||||
error: failed to fetch GitHub release (run with '-v' for details)
|
error: failed to fetch GitHub release (run with '-v' for details)
|
||||||
Some required targets logged failures:
|
Some required targets logged failures:
|
||||||
- dep:release
|
- dep:release
|
||||||
error: build failed
|
error: build failed
|
||||||
EOF
|
EOF
|
||||||
) build dep:release
|
)
|
||||||
|
|
||||||
# Test that an indirect fetch on the release does not cause the build to fail
|
# Test that an indirect fetch on the release does not cause the build to fail
|
||||||
echo "# TEST: Indirect fetch"
|
echo "# TEST: Indirect fetch"
|
||||||
test_out_diff <(cat << EOF
|
$LAKE build Test -q 2>&1 | diff_out "Ran" <(cat << EOF
|
||||||
⚠ [3/6] Ran dep:extraDep
|
Ran dep:extraDep
|
||||||
warning: building from source; failed to fetch GitHub release (run with '-v' for details)
|
warning: building from source; failed to fetch GitHub release (run with '-v' for details)
|
||||||
EOF
|
EOF
|
||||||
) build Test -q
|
)
|
||||||
|
|
||||||
# Test download failure
|
# Test download failure
|
||||||
echo "# TEST: Download failure"
|
echo "# TEST: Download failure"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue