Skip to content

Commit ff0f6ed

Browse files
committed
Stylistic changes
1 parent e79122e commit ff0f6ed

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

scripts/run-android-tests.sh

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,24 @@ PID_RETRIES=10
1010
LOGCAT_FILTERS="Godot,godot,sentry-godot,sentry-native"
1111
EXPORT_PRESET="Android CI"
1212

13+
usage() {
14+
echo "Usage: $0 [OPTIONS]"
15+
echo ""
16+
echo "Run unit tests on a local Android device."
17+
echo ""
18+
echo "OPTIONS:"
19+
echo " -v, --verbose Enable additional output"
20+
echo " -h, --help Display this help message"
21+
echo ""
22+
echo "PREREQUISITES:"
23+
echo " - Godot Engine 4.5 or later with Android export templates installed"
24+
echo " - Android SDK with ADB (Android Debug Bridge) tools"
25+
echo " - Android device connected and authorized for debugging"
26+
echo ""
27+
echo "ENVIRONMENT VARIABLES:"
28+
echo " GODOT Path to Godot executable (if not in PATH)"
29+
}
30+
1331
# Formatted output
1432
highlight() { echo -e "\033[1;34m$1\033[0m"; }
1533
msg() { echo -e "\033[1m$1\033[0m"; }
@@ -32,25 +50,6 @@ abort() {
3250
exit 1
3351
}
3452

35-
# Display usage information
36-
usage() {
37-
echo "Usage: $0 [OPTIONS]"
38-
echo ""
39-
echo "Run unit tests on a local Android device."
40-
echo ""
41-
echo "OPTIONS:"
42-
echo " -v, --verbose Enable additional output"
43-
echo " -h, --help Display this help message"
44-
echo ""
45-
echo "PREREQUISITES:"
46-
echo " - Godot Engine 4.5 or later with Android export templates installed"
47-
echo " - Android SDK with ADB (Android Debug Bridge) tools"
48-
echo " - Android device connected and authorized for debugging"
49-
echo ""
50-
echo "ENVIRONMENT VARIABLES:"
51-
echo " GODOT Path to Godot executable (if not in PATH)"
52-
}
53-
5453
# Parse command line options
5554
verbose=false
5655

@@ -85,7 +84,9 @@ if [ -z "$godot" ] || [ ! -x "$godot" ]; then
8584
error "Godot executable not found. Please ensure 'godot' is in PATH or set GODOT environment variable."
8685
exit 1
8786
fi
87+
8888
"$godot" --path project --headless --install-android-build-template --export-debug "$EXPORT_PRESET" ../exports/android.apk
89+
8990
if [ $? -ne 0 ]; then
9091
warning "Godot export process returned an error. Proceeding anyway..."
9192
fi
@@ -150,6 +151,7 @@ run_tests() {
150151
fi
151152
sleep 1
152153
done
154+
153155
if [ -z "$pid" ]; then
154156
error "Failed to get PID of the app"
155157
return 3

0 commit comments

Comments
 (0)