Debian Codegraph @

Tools/run-unit-tests-android.sh

raw symbols SCIP
1 #!/bin/bash
2 #
3 # Runs unit tests (must have been built beforehand) on an Android device connected via adb.
4 #
5 # The current working directory must contain test executables. Normally (for AArch64)
6 # the working directory would be: Source/Android/app/.cxx/cmake/debug/arm64-v8a/Binaries/Tests
7
8 DEVICE_DIR="/data/local/tmp/dolphin-emu-tests"
9
10 # Prevent MingW MSYS from being "smart" and turning the path above into a Windows-style path
11 export MSYS_NO_PATHCONV=1
12 export MSYS2_ARG_CONV_EXCL="*"
13
14 for path in *; do
15 f=$(basename "$path")
16
17 adb push "$path" "$DEVICE_DIR/$f" && adb shell chmod 775 "$DEVICE_DIR/$f" && adb shell "$DEVICE_DIR/$f"
18 RESULT=$(($RESULT+$?))
19
20 # Some of these executables are pretty big, so let's remove them as soon as we're done
21 adb shell rm "$DEVICE_DIR/$f"
22 done
23
24 echo ""
25 echo "Total failed tests: $RESULT"
26
27 exit $RESULT