chore: make docs test upload test result when needed (#27660)

This commit is contained in:
Yihau Chen 2022-09-08 14:09:07 +08:00 committed by GitHub
parent f338aa62ba
commit 54129c4f16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -228,9 +228,13 @@ test-wasm)
exit 0
;;
test-docs)
_ "$cargo" stable test --jobs "$JOBS" --all --doc --exclude solana-local-cluster ${V:+--verbose} -- -Z unstable-options --format json --report-time | tee results.json
exit_if_error "${PIPESTATUS[0]}"
exit 0
if need_to_generate_test_result; then
_ "$cargo" stable test --jobs "$JOBS" --all --doc --exclude solana-local-cluster ${V:+--verbose} -- -Z unstable-options --format json --report-time | tee results.json
exit "${PIPESTATUS[0]}"
else
_ "$cargo" stable test --jobs "$JOBS" --all --doc --exclude solana-local-cluster ${V:+--verbose} -- --nocapture
exit 0
fi
;;
*)
echo "Error: Unknown test: $testName"