Move {join,host}.lua to a better place

This commit is contained in:
Gunter Labes 2023-08-03 22:06:27 +02:00 committed by GitHub
parent a0d7054360
commit 64f702e96d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 27 deletions

View file

@ -55,7 +55,7 @@ local function plugin()
context.select_type({type = "scenario"})
local s = info.find_level({id = "test1"})
if s.index < 0 then
log(" error: Could not find scenario with id=test1")
log(" error: Could not find scenario with id=test1")
end
context.select_level({index = s.index})

View file

@ -1,22 +0,0 @@
#!/bin/bash
tab="--tab"
cmd0="bash -c './wesnothd --port 12345 --log-debug=server --log-warning=config';bash"
cmd1="bash -c '"
cmd1+='gdb -q -batch -return-child-result -ex "run" -ex "thread apply all bt" -ex "quit" --args ./wesnoth --plugin=host.lua --server=localhost:12345 --username=host --nogui --mp-test'
cmd1+="';bash"
cmd2="bash -c '"
cmd2+='gdb -q -batch -return-child-result -ex "run" -ex "thread apply all bt" -ex "quit" --args ./wesnoth --plugin=join.lua --server=localhost:12345 --username=join --nogui --mp-test'
cmd2+="';bash"
#cmd3="bash -c './client3';bash"
foo=""
foo+=($tab -e "$cmd0")
foo+=($tab -e "$cmd1")
foo+=($tab -e "$cmd2")
#foo+=($tab -e "$cmd3")
gnome-terminal "${foo[@]}"
exit 0

View file

@ -10,24 +10,24 @@ LOOP_TIME=6
serverpid=$!
sleep 5
./wesnoth --plugin=host.lua --server=localhost:12345 --username=host --mp-test --noaddons --nogui &> wesnoth-host.log &
./wesnoth --plugin=data/test/plugin/host.lua --server=localhost:12345 --username=host --mp-test --noaddons --nogui &> wesnoth-host.log &
hostpid=$!
sleep 2
while grep -q 'Could not initialize SDL_video' wesnoth-host.log; do
echo "Could not initialize SDL_video error, retrying..."
./wesnoth --plugin=host.lua --server=localhost:12345 --username=host --mp-test --noaddons --nogui &> wesnoth-host.log &
./wesnoth --plugin=data/test/plugin/host.lua --server=localhost:12345 --username=host --mp-test --noaddons --nogui &> wesnoth-host.log &
hostpid=$!
sleep 2
done
./wesnoth --plugin=join.lua --server=localhost:12345 --username=join --mp-test --noaddons --nogui &> wesnoth-join.log &
./wesnoth --plugin=data/test/plugin/join.lua --server=localhost:12345 --username=join --mp-test --noaddons --nogui &> wesnoth-join.log &
joinpid=$!
sleep 2
while grep -q 'Could not initialize SDL_video' wesnoth-join.log; do
echo "Could not initialize SDL_video error, retrying..."
./wesnoth --plugin=join.lua --server=localhost:12345 --username=join --mp-test --noaddons --nogui &> wesnoth-join.log &
./wesnoth --plugin=data/test/plugin/join.lua --server=localhost:12345 --username=join --mp-test --noaddons --nogui &> wesnoth-join.log &
joinpid=$!
sleep 2
done