Skip to content

Commit 5128a9d

Browse files
committed
Update run-android-tests.sh
1 parent f965520 commit 5128a9d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/run-android-tests.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ msg() { echo -e "\033[1m$1\033[0m"; }
3535
error() { echo -e "\033[1;31m$1\033[0m"; }
3636
warning() { echo -e "\033[1;33m$1\033[0m"; }
3737
success() { echo -e "\033[1;32m$1\033[0m"; }
38+
github() { [ "$GITHUB_ACTIONS" = "true" ] && echo $1; }
39+
blankline() { echo " " }
3840

3941
# Check exit code of previous command and abort with message if non-zero
4042
abort_on_error() {
@@ -93,7 +95,7 @@ if [ $? -ne 0 ]; then
9395
fi
9496

9597
# Install APK (allow multiple attempts)
96-
echo ""
98+
blankline
9799
highlight "Installing APK..."
98100
adb kill-server 2>/dev/null
99101
for i in $(seq 1 $INSTALL_RETRIES); do
@@ -238,7 +240,7 @@ run_tests() {
238240

239241
# Discover isolated test suites and add normal suites as first item
240242
TEST_PATHS=("res://test/suites/")
241-
echo ""
243+
blankline
242244
highlight "Looking for isolated test suites..."
243245
TEST_PATHS+=($(find project/test/isolated -name "test_*.gd" -type f | sort))
244246

@@ -263,12 +265,15 @@ for test_path in "${TEST_PATHS[@]}"; do
263265
godot_path="res://${test_path#project/}"
264266
fi
265267

266-
echo ""
268+
blankline
267269
highlight "Running tests: $godot_path"
270+
github "::group::Test log $godot_path"
268271

269272
run_tests "$godot_path"
270273
test_exit_code=$?
271274

275+
github "::endgroup::"
276+
272277
if [ $test_exit_code -eq 0 ]; then
273278
PASSED_TESTS+=("$godot_path")
274279
success "✓ PASSED: $godot_path"
@@ -283,7 +288,7 @@ for test_path in "${TEST_PATHS[@]}"; do
283288
done
284289

285290
# Summary
286-
echo ""
291+
blankline
287292
highlight "Final Results"
288293
msg "Passed: ${#PASSED_TESTS[@]}"
289294
msg "Failed: ${#FAILED_TESTS[@]}"

0 commit comments

Comments
 (0)