push2android.sh 844 字节
Newer Older
W
wangliu 已提交
1 2 3
#!/usr/bin/env sh

push_fn () {
W
wangliu 已提交
4
MODELS_PATH="../../test/models/*"
E
eclipsess 已提交
5
MODELS_SRC="../../test/models"
W
wangliu 已提交
6 7
IMAGE_PATH="../../test/images/*"
EXE_FILE="../../test/build/*"
W
wangliu 已提交
8
EXE_DIR="data/local/tmp/bin"
E
eclipsess 已提交
9
adb shell mkdir ${EXE_DIR}
W
wangliu 已提交
10
MODELS_DIR="data/local/tmp/models"
E
eclipsess 已提交
11 12 13 14 15 16
adb shell mkdir ${MODELS_DIR}
for file in `ls ${MODELS_SRC}`
do 
    adb shell mkdir ${MODELS_DIR}"/"${file}
done

L
liuruilong 已提交
17
IMAGES_DIR="data/local/tmp/images"
E
eclipsess 已提交
18
adb shell mkdir ${IMAGES_DIR}
19
LIB_PATH="../../build/release/arm-v7a/build/*"
W
wangliu 已提交
20 21
adb push ${EXE_FILE} ${EXE_DIR}
adb push ${LIB_PATH} ${EXE_DIR}
L
liuruilong 已提交
22
adb push ${IMAGE_PATH} ${IMAGES_DIR}
W
wangliu 已提交
23
adb push ${MODELS_PATH} ${MODELS_DIR}
E
eclipsess 已提交
24 25 26 27 28
echo "test-op or test-net below : "
adb shell ls /data/local/tmp/bin
echo "**** choose OP or NET to test ****"
read -p "which to test : " test_name
adb shell "cd /data/local/tmp/bin; LD_LIBRARY_PATH=. ./${test_name}"
W
wangliu 已提交
29 30
}
push_fn