run.sh 815 字节
Newer Older
E
eclipsess 已提交
1
#!/usr/bin/env sh
E
eclipsess 已提交
2 3
# auto build and run

E
eclipsess 已提交
4 5
BUILDNET="mobilenetssd"
TESTUNIT="test-mobilenetssd"
E
eclipsess 已提交
6 7

push_fn () {
E
eclipsess 已提交
8
sh build.sh android ${BUILDNET}
E
eclipsess 已提交
9
MODELS_PATH="../test/models/*"
E
eclipsess 已提交
10
MODELS_SRC="../test/models"
E
eclipsess 已提交
11 12 13 14 15 16 17
IMAGE_PATH="../test/images/*"
EXE_FILE="../test/build/*"
EXE_DIR="data/local/tmp/bin"
adb shell mkdir ${EXE_DIR}
MODELS_DIR="data/local/tmp/models"
adb shell mkdir ${MODELS_DIR}
for file in `ls ${MODELS_SRC}`
E
eclipsess 已提交
18
do
E
eclipsess 已提交
19 20 21 22 23 24 25 26
    adb shell mkdir ${MODELS_DIR}"/"${file}
done

IMAGES_DIR="data/local/tmp/images"
adb shell mkdir ${IMAGES_DIR}
LIB_PATH="../build/release/arm-v7a/build/*"
adb push ${EXE_FILE} ${EXE_DIR}
adb push ${LIB_PATH} ${EXE_DIR}
E
eclipsess 已提交
27
if [[ $1 != "pm" ]]; then
E
eclipsess 已提交
28
adb push ${IMAGE_PATH} ${IMAGES_DIR}
E
eclipsess 已提交
29 30
adb push ${MODELS_PATH} ${MODELS_DIR}
fi
E
eclipsess 已提交
31
adb shell "cd /data/local/tmp/bin; LD_LIBRARY_PATH=. ./${TESTUNIT}"
E
eclipsess 已提交
32
}
L
liuruilong 已提交
33

E
eclipsess 已提交
34
push_fn