4 TARGET_DIR=/home/$TARGET_USER/elmsharp_test
5 TARGET_RES_DIR=$TARGET_DIR/res
7 TO_COPY_FILES="bin/Debug"
17 sdb shell su -l $TARGET_USER -c "$1"
21 echo "Usage: $0 [options] [testcase]"
23 echo " -h, --help Show this usages message"
24 echo " -i, --install Install test cases to target device"
25 echo " -r, --install-res Install resource files for test cases to target device"
26 echo " -m, --use-mono Execute test case by using mono instead of corerun"
32 sdb_cmd "rm -fr $TARGET_DIR"
33 sdb_cmd "mkdir -p $TARGET_DIR"
34 sdb push $TO_COPY_FILES/Tizen*.dll $TARGET_DIR
35 sdb push $TO_COPY_FILES/ElmSharp*.dll $TARGET_DIR
36 sdb push $TO_COPY_FILES/ElmSharp*.exe $TARGET_DIR
42 sdb_cmd "rm -fr $TARGET_RES_DIR"
43 sdb_cmd "mkdir -p $TARGET_RES_DIR"
44 sdb push $TO_COPY_FILES/res $TARGET_RES_DIR
50 sdb_cmd "/usr/share/tizen.net/corerun $TARGET_DIR/ElmSharp.Test.exe $1"
56 sdb_cmd "MONO_TRACE_LISTENER=Console.Error mono $TARGET_DIR/ElmSharp.Test.exe $1"
60 OPTS=`getopt -o hirm --long help,install,install-res,use-mono -n 'test' -- "$@"`
61 if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; usage; exit 1 ; fi
66 FLAG_INSTALL_RES=false
71 -h|--help) FLAG_HELP=true; shift ;;
72 -i|--install) FLAG_INSTALL=true; shift ;;
73 -r|--install-res) FLAG_INSTALL_RES=true; shift ;;
74 -m|--use-mono) FLAG_USE_MONO=true; shift ;;
80 if $FLAG_HELP; then usage; exit 1; fi
82 if $FLAG_INSTALL; then install; fi
83 if $FLAG_INSTALL_RES; then install_res; fi
84 if $FLAG_USE_MONO; then run_mono $@; else run $@; fi