3 # Copy the toybox tests across.
4 adb shell mkdir /data/local/tmp/toybox-tests/
5 adb push tests/ /data/local/tmp/toybox-tests/
6 adb push scripts/runtest.sh /data/local/tmp/toybox-tests/
8 # Make a temporary directory on the device.
9 tmp_dir=`adb shell TMPDIR=/data/local/tmp mktemp --directory`
16 location=$(adb shell "which $toy")
18 echo "-- $toy not present"
24 implementation=$(adb shell "realpath $location")
25 if [ "$implementation" != "/system/bin/toybox" ]; then
26 echo "-- note: $toy is non-toybox implementation"
29 adb shell -t "export FILES=/data/local/tmp/toybox-tests/tests/files/ ; \
31 export CMDNAME=$toy; \
33 export LANG=en_US.UTF-8; \
35 source /data/local/tmp/toybox-tests/runtest.sh ; \
36 source /data/local/tmp/toybox-tests/tests/$toy.test"
39 if [ "$#" -eq 0 ]; then
41 for t in tests/*.test; do
42 toy=`echo $t | sed 's|tests/||' | sed 's|\.test||'`
46 # Just run the tests for the given toys.