diff --git a/tools/run_on_android.sh b/tools/run.sh similarity index 74% rename from tools/run_on_android.sh rename to tools/run.sh index 67f9a5f2a45dd59078c8218cdd8b4d709b39f5e7..4e00b810f6d11971c32686f9eef3237b904c9a3c 100644 --- a/tools/run_on_android.sh +++ b/tools/run.sh @@ -1,7 +1,11 @@ #!/usr/bin/env sh +# auto build and run + +BUILDNET="googlenet" +TESTUNIT="test-googlenet" push_fn () { -sh build.sh android googlenet +sh build.sh android ${BUILDNET} MODELS_PATH="../test/models/*" MODELS_SRC="../../test/models" IMAGE_PATH="../test/images/*" @@ -11,7 +15,7 @@ adb shell mkdir ${EXE_DIR} MODELS_DIR="data/local/tmp/models" adb shell mkdir ${MODELS_DIR} for file in `ls ${MODELS_SRC}` -do +do adb shell mkdir ${MODELS_DIR}"/"${file} done @@ -22,9 +26,6 @@ adb push ${EXE_FILE} ${EXE_DIR} adb push ${LIB_PATH} ${EXE_DIR} adb push ${IMAGE_PATH} ${IMAGES_DIR} adb push ${MODELS_PATH} ${MODELS_DIR} -echo "test-op or test-net below : " -adb shell ls /data/local/tmp/bin -echo "**** choose OP or NET to test ****" -adb shell "cd /data/local/tmp/bin; LD_LIBRARY_PATH=. ./test-lrn-op" +adb shell "cd /data/local/tmp/bin; LD_LIBRARY_PATH=. ./${TESTUNIT}" } push_fn