File: run_android_test.sh

package info (click to toggle)
ruy 0.0.0~git20230215.21a85fe-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,024 kB
  • sloc: cpp: 26,960; python: 181; sh: 154; makefile: 13
file content (16 lines) | stat: -rwxr-xr-x 645 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# Minimal script pushing and running a file on device!
# Contemporary versions of ADB properly propagate exit codes so nothing more
# is needed to let CTest report test success/failure.

# TODO: consider clearing temporary files after testing, although that will
# get in the way of debugging and will make code more complex... also,
# Ruy's test files aren't huge and people running these probably have
# bigger clutter issues in their /data/local/tmp anyway. Anyway, if we want
# to do this, we could copy IREE's code.

device_tmpdir=/data/local/tmp

adb push "$1" "${device_tmpdir}"
adb shell "${device_tmpdir}/$(basename "$1")"