Skip to content

Commit 0dcfec0

Browse files
committed
Expand test group log when tests failed
1 parent 9dcb75c commit 0dcfec0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.buildkite/commands/run-ui-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ bundle exec fastlane test_without_building name:"$TEST_NAME" device:"$DEVICE" io
4040
TESTS_EXIT_STATUS=$?
4141
set -e
4242

43+
if [[ "$TESTS_EXIT_STATUS" -ne 0 ]]; then
44+
# Keep the (otherwise collapsed) current "Testing" section open in Buildkite logs on error. See https://buildkite.com/docs/pipelines/managing-log-output#collapsing-output
45+
echo "^^^ +++"
46+
echo "UI Tests failed!"
47+
fi
48+
4349
echo "--- 📦 Zipping test results"
4450
cd fastlane/test_output/ && zip -rq WooCommerce.xcresult.zip WooCommerce.xcresult && cd -
4551

.buildkite/commands/run-unit-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ bundle exec fastlane test_without_building name:UnitTests
2121
TESTS_EXIT_STATUS=$?
2222
set -e
2323

24+
if [[ "$TESTS_EXIT_STATUS" -ne 0 ]]; then
25+
# Keep the (otherwise collapsed) current "Testing" section open in Buildkite logs on error. See https://buildkite.com/docs/pipelines/managing-log-output#collapsing-output
26+
echo "^^^ +++"
27+
echo "Unit Tests failed!"
28+
fi
29+
2430
echo "--- 📦 Zipping test results"
2531
cd fastlane/test_output/ && zip -rq WooCommerce.xcresult.zip WooCommerce.xcresult && cd -
2632

0 commit comments

Comments
 (0)