run-unit-tests-android.sh: Handle Sys directory

This script was written before the Sys directory was used in unit tests.

The existing code would successfully push the Sys directory, but would
then get an error trying to execute the Sys directory, making $RESULT
non-zero. This change fixes that.
This commit is contained in:
JosJuice 2024-12-26 13:05:48 +01:00
parent f561b11155
commit 96804f95e4

View File

@ -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 ""