From dc8703206e3f0f69605c56d0e1127f7e17f3476a Mon Sep 17 00:00:00 2001 From: Jan Sucan Date: Tue, 4 Jun 2019 14:34:27 +0200 Subject: Initial commit --- testing/yup_comm.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 testing/yup_comm.sh (limited to 'testing/yup_comm.sh') 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 +} -- cgit v1.2.3