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

BUILDNET="googlenet"
TESTUNIT="test-googlenet"
E
eclipsess 已提交
6 7

push_fn () {
E
eclipsess 已提交
8
sh build.sh android ${BUILDNET}
E
eclipsess 已提交
9 10 11 12 13 14 15 16 17
MODELS_PATH="../test/models/*"
MODELS_SRC="../../test/models"
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 27 28
    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}
adb push ${IMAGE_PATH} ${IMAGES_DIR}
adb push ${MODELS_PATH} ${MODELS_DIR}
E
eclipsess 已提交
29
adb shell "cd /data/local/tmp/bin; LD_LIBRARY_PATH=. ./${TESTUNIT}"
E
eclipsess 已提交
30 31
}
push_fn