diff options
| author | Jan Sucan <sucanjan@fit.cvut.cz> | 2019-06-04 14:34:27 +0200 |
|---|---|---|
| committer | Jan Sucan <sucanjan@fit.cvut.cz> | 2019-06-04 14:34:27 +0200 |
| commit | dc8703206e3f0f69605c56d0e1127f7e17f3476a (patch) | |
| tree | 166823a741dc420c10d54250cb53d1e3a6b74faf /testing/yup_comm.sh | |
Initial commit
Diffstat (limited to 'testing/yup_comm.sh')
| -rw-r--r-- | testing/yup_comm.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/yup_comm.sh b/testing/yup_comm.sh new file mode 100644 index 0000000..ba60d78 --- /dev/null +++ b/testing/yup_comm.sh @@ -0,0 +1,27 @@ +YUP_COMM_SERVER=../yup-comm/yup-comm-server.exe +YUP_COMM_CLIENT=../yup-comm/yup-comm-client.exe + +yup_comm_start_server() +{ + $YUP_COMM_SERVER $1 1>/dev/null 2>&1 & + sleep 2 + $YUP_COMM_CLIENT ping 1>/dev/null 2>&1 +} + +yup_comm_stop_server() +{ + $YUP_COMM_CLIENT exit 1>/dev/null 2>&1 +} + +yup_comm_execute_dm_cmd() +{ + if [ $# -ne 2 ]; then + echo 'yup_comm_execute_dm_cmd: ERROR: incorect number of arguments' + return 1 + fi + + win_cmd_path="$(cygpath -w "$1" | sed 's,\\,\\\\,g')" + win_reply_path="$(cygpath -w "$2" | sed 's,\\,\\\\,g')" + + $YUP_COMM_CLIENT "${win_cmd_path},${win_reply_path}" 1>/dev/null 2>&1 +} |
