Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #9475 from JosJuice/android-unit-tests
Add script for running unit tests on Android device
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #!/bin/bash | ||
| # | ||
| # Runs unit tests (must have been built beforehand) on an Android device connected via adb. | ||
| # | ||
| # The current working directory must contain test executables. Normally (for AArch64) | ||
| # the working directory would be: Source/Android/app/.cxx/cmake/debug/arm64-v8a/Binaries/Tests | ||
|
|
||
| DEVICE_DIR="/data/local/tmp/dolphin-emu-tests" | ||
|
|
||
| # Prevent MingW MSYS from being "smart" and turning the path above into a Windows-style path | ||
| export MSYS_NO_PATHCONV=1 | ||
| export MSYS2_ARG_CONV_EXCL="*" | ||
|
|
||
| for path in *; do | ||
| f=$(basename "$path") | ||
|
|
||
| adb push "$path" "$DEVICE_DIR/$f" && adb shell chmod 775 "$DEVICE_DIR/$f" && adb shell "$DEVICE_DIR/$f" | ||
| RESULT=$(($RESULT+$?)) | ||
|
|
||
| # Some of these executables are pretty big, so let's remove them as soon as we're done | ||
| adb shell rm "$DEVICE_DIR/$f" | ||
| done | ||
|
|
||
| echo "" | ||
| echo "Total failed tests: $RESULT" | ||
|
|
||
| exit $RESULT |