From 54129c4f16fd18cc7edb475bbc6d52dbcfcc40a9 Mon Sep 17 00:00:00 2001 From: Yihau Chen Date: Thu, 8 Sep 2022 14:09:07 +0800 Subject: [PATCH] chore: make docs test upload test result when needed (#27660) --- ci/test-stable.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 3ea987a5e5..e3a630599d 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -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"