diff --git a/Tools/run-unit-tests-android.sh b/Tools/run-unit-tests-android.sh index 7c4c953f63..c7750c14dd 100644 --- a/Tools/run-unit-tests-android.sh +++ b/Tools/run-unit-tests-android.sh @@ -11,14 +11,25 @@ DEVICE_DIR="/data/local/tmp/dolphin-emu-tests" export MSYS_NO_PATHCONV=1 export MSYS2_ARG_CONV_EXCL="*" +# Remove old copy of the Sys directory +adb shell rm -r "$DEVICE_DIR" + +# Push new copy of the Sys directory +if [ -d "Sys" ]; then + adb push "Sys" "$DEVICE_DIR/Sys" +fi + +# Push and run executables 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+$?)) + if [ -f "$path" ]; then + 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" + # Some of these executables are pretty big, so let's remove them as soon as we're done + adb shell rm "$DEVICE_DIR/$f" + fi done echo ""