wasplib: add get_hud_by_texture
[waspsaliva.git] / util / test_multiplayer.sh
blob176cf11d9dfa0099048f6eca60472ff4d90a4352
1 #!/bin/bash
2 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3 gameid=devtest
4 minetest=$dir/../bin/minetest
5 testspath=$dir/../tests
6 worldpath=$testspath/testworld_$gameid
7 configpath=$testspath/configs
8 logpath=$testspath/log
9 conf_server=$configpath/minetest.conf.multi.server
10 conf_client1=$configpath/minetest.conf.multi.client1
11 conf_client2=$configpath/minetest.conf.multi.client2
12 log_server=$logpath/server.log
13 log_client1=$logpath/client1.log
14 log_client2=$logpath/client2.log
16 mkdir -p $worldpath
17 mkdir -p $configpath
18 mkdir -p $logpath
20 echo -ne 'client1::shout,interact,settime,teleport,give
21 client2::shout,interact,settime,teleport,give
22 ' > $worldpath/auth.txt
24 echo -ne '' > $conf_server
26 echo -ne '# client 1 config
27 screenW=500
28 screenH=380
29 name=client1
30 viewing_range_nodes_min=10
31 ' > $conf_client1
33 echo -ne '# client 2 config
34 screenW=500
35 screenH=380
36 name=client2
37 viewing_range_nodes_min=10
38 ' > $conf_client2
40 echo $(sleep 1; $minetest --disable-unittests --logfile $log_client1 --config $conf_client1 --go --address localhost) &
41 echo $(sleep 2; $minetest --disable-unittests --logfile $log_client2 --config $conf_client2 --go --address localhost) &
42 $minetest --disable-unittests --server --logfile $log_server --config $conf_server --world $worldpath --gameid $gameid