Each test has a general log file in the following schema:
remotebackend_<module>.log
When testrunner.sh spins up a service, the service logs its output
into the general log file. But test-driver from automake, which is
using the same log file and starts after the test service is up and
running, will overwrite the log file.
So in case of a server failure we will miss important log data.
Using a dedicated log file for the services we start will solve
this problem. The new schema for server log files will be
remotebackend_<module>_server.log
remotebackend_json.test \
remotebackend_zeromq.test
+RECHECK_LOGS = \
+ $(TEST_LOGS) \
+ remotebackend_http_server.log \
+ remotebackend_post_server.log \
+ remotebackend_json_server.log \
+ remotebackend_zeromq_server.log
+
## The http, post and json test are using the same TCP port.
## To prevent "Address already in use - bind(2) (Errno::EADDRINUSE)"
## errors when running `make check` in parallel, we need to specify
socat=$(which socat)
function start_web() {
- ./unittest_$1.rb >> $mode.log 2>&1 &
+ ./unittest_$1.rb >> ${mode%\.test}_server.log 2>&1 &
webrick_pid=$!
loopcount=0
while [ $loopcount -lt 20 ]; do
function start_zeromq() {
if [ x"$REMOTEBACKEND_ZEROMQ" == "xyes" ]; then
- ./unittest_zeromq.rb >> $mode.log 2>&1 &
+ ./unittest_zeromq.rb >> ${mode%\.test}_server.log 2>&1 &
zeromq_pid=$!
# need to wait a moment
sleep 5