Skip to content

Commit

Permalink
Expand test group log when tests failed
Browse files Browse the repository at this point in the history
  • Loading branch information
crazytonyli committed Sep 5, 2022
1 parent 9dcb75c commit 0dcfec0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .buildkite/commands/run-ui-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ bundle exec fastlane test_without_building name:"$TEST_NAME" device:"$DEVICE" io
TESTS_EXIT_STATUS=$?
set -e

if [[ "$TESTS_EXIT_STATUS" -ne 0 ]]; then
# Keep the (otherwise collapsed) current "Testing" section open in Buildkite logs on error. See https://buildkite.com/docs/pipelines/managing-log-output#collapsing-output
echo "^^^ +++"
echo "UI Tests failed!"
fi

echo "--- 📦 Zipping test results"
cd fastlane/test_output/ && zip -rq WooCommerce.xcresult.zip WooCommerce.xcresult && cd -

Expand Down
6 changes: 6 additions & 0 deletions .buildkite/commands/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ bundle exec fastlane test_without_building name:UnitTests
TESTS_EXIT_STATUS=$?
set -e

if [[ "$TESTS_EXIT_STATUS" -ne 0 ]]; then
# Keep the (otherwise collapsed) current "Testing" section open in Buildkite logs on error. See https://buildkite.com/docs/pipelines/managing-log-output#collapsing-output
echo "^^^ +++"
echo "Unit Tests failed!"
fi

echo "--- 📦 Zipping test results"
cd fastlane/test_output/ && zip -rq WooCommerce.xcresult.zip WooCommerce.xcresult && cd -

Expand Down

0 comments on commit 0dcfec0

Please sign in to comment.