From 17af3e3770f84a709b123c7c5a696fb2a49f313d Mon Sep 17 00:00:00 2001 From: ChillerDragon Date: Mon, 22 Jan 2024 21:55:36 +0800 Subject: [PATCH] Set 0.7 protocol for ddnet7 client in CI --- integration_test/run.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/integration_test/run.sh b/integration_test/run.sh index dbfd73d..68a44e2 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -6,9 +6,10 @@ tw_srv_bin=teeworlds_srv logdir=logs tmpdir=tmp kill_marker=kill_me_d5af0410 -srvcfg="sv_rcon_password rcon;sv_port 8377;$kill_marker" +server_port=8377 +srvcfg="sv_rcon_password rcon;sv_port $server_port;$kill_marker" cl_fifo="$tmpdir/client.fifo" -clcfg="cl_input_fifo $cl_fifo;connect 127.0.0.1:8377;$kill_marker" +clcfg="cl_input_fifo $cl_fifo;connect 127.0.0.1:$server_port;$kill_marker" tw_srv_running=0 ruby_logfile=ruby_client.txt @@ -53,12 +54,14 @@ function connect_tw_client() { } function connect_ddnet7_client() { + local clcfg_dd7 + clcfg_dd7="$(echo "$clcfg" | sed 's/127.0.0.1/tw-0.7+udp:\/\/127.0.0.1/')" if [[ -x "$(command -v DDNet7-headless)" ]] then - DDNet7-headless "$clcfg" + DDNet7-headless "$clcfg_dd7" elif [[ -x "$(command -v /usr/local/bin/DDNet7-headless)" ]] then - /usr/local/bin/DDNet7-headless "$clcfg" + /usr/local/bin/DDNet7-headless "$clcfg_dd7" else echo "Error: please install a DDNet7-headless" exit 1