mirror of
https://github.com/kakwa/uts-server
synced 2024-12-04 23:15:54 +01:00
few hacks to allow parallele execution
This commit is contained in:
parent
3b6e424f23
commit
f7f162a5da
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
PORT=`awk -v min=10000 -v max=20000 'BEGIN{srand(); print int(min+rand()*(max-min+1))}'`
|
||||||
|
|
||||||
if which timeout >/dev/null 2>&1
|
if which timeout >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
TO="timeout 120"
|
TO="timeout 120"
|
||||||
@ -7,20 +9,31 @@ else
|
|||||||
TO=""
|
TO=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$TO ./uts-server -c tests/cfg/uts-server.cnf -D -p ./uts-server.pid &
|
export TMPDIR='./tests/cfg/'
|
||||||
|
CFG=`mktemp`
|
||||||
|
|
||||||
|
clean_clean_exit(){
|
||||||
|
rm - $CFG
|
||||||
|
clean_exit $1
|
||||||
|
}
|
||||||
|
sed "s/2020/$PORT/" tests/cfg/uts-server.cnf >$CFG
|
||||||
|
|
||||||
|
$TO ./uts-server -c $CFG -D -p ./uts-server.pid &
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
./goodies/timestamp-file.sh -i README.rst -u http://localhost:2020 -r -O "-cert" || exit 1
|
./goodies/timestamp-file.sh -i README.rst -u http://localhost:$PORT -r -O "-cert" || clean_exit 1
|
||||||
./goodies/timestamp-file.sh -i README.rst -u http://localhost:2020 -r -O "-cert" || exit 1
|
./goodies/timestamp-file.sh -i README.rst -u http://localhost:$PORT -r -O "-cert" || clean_exit 1
|
||||||
./goodies/timestamp-file.sh -i README.rst -u http://localhost:2020 -r -O "-cert" || exit 1
|
./goodies/timestamp-file.sh -i README.rst -u http://localhost:$PORT -r -O "-cert" || clean_exit 1
|
||||||
|
|
||||||
kill `cat ./uts-server.pid`
|
kill `cat ./uts-server.pid`
|
||||||
|
|
||||||
$TO ./uts-server -c tests/cfg/uts-server-ssl.cnf -D -p ./uts-server.pid &
|
sed "s/2020/$PORT/" tests/cfg/uts-server-ssl.cnf >$CFG
|
||||||
|
|
||||||
|
$TO ./uts-server -c $CFG -D -p ./uts-server.pid &
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
./goodies/timestamp-file.sh -i README.rst -u https://localhost:2020 -r -O "-cert" -C '-k' || exit 1
|
./goodies/timestamp-file.sh -i README.rst -u https://localhost:$PORT -r -O "-cert" -C '-k' || clean_exit 1
|
||||||
./goodies/timestamp-file.sh -i README.rst -u https://localhost:2020 -r -O "-cert" -C '-k' || exit 1
|
./goodies/timestamp-file.sh -i README.rst -u https://localhost:$PORT -r -O "-cert" -C '-k' || clean_exit 1
|
||||||
./goodies/timestamp-file.sh -i README.rst -u https://localhost:2020 -r -O "-cert" -C '-k' || exit 1
|
./goodies/timestamp-file.sh -i README.rst -u https://localhost:$PORT -r -O "-cert" -C '-k' || clean_exit 1
|
||||||
|
|
||||||
kill `cat ./uts-server.pid`
|
kill `cat ./uts-server.pid`
|
||||||
|
Loading…
Reference in New Issue
Block a user