mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 21:30:42 +01:00
This is work torward the ability to run the testbench in parallel. Some small issues in tests have also been detected, which were not previously seen. They have been fixed. We did not do separate commits for this as it would clutter the commit log with not really relevant info. Also move some cleanup to "make clean" target To support parallel testbench runs, we need to have dynamic work files. So deleting work files on each test does not work, especially as we can no longer assume they are "left-overs" from a failed test - they may actually (and quite likely) belong to tests that run in parallel. So the proper solution is to do via "make clean". closes https://github.com/rsyslog/rsyslog/pull/2916
33 lines
698 B
Bash
Executable File
33 lines
698 B
Bash
Executable File
#!/bin/bash
|
|
|
|
outfile=$RSYSLOG_OUT_LOG
|
|
|
|
function handle_sigterm {
|
|
echo "Received SIGTERM" >> $outfile
|
|
}
|
|
trap "handle_sigterm" SIGTERM
|
|
|
|
echo "Starting" >> $outfile
|
|
|
|
# Tell rsyslog we are ready to start processing messages
|
|
echo "OK"
|
|
|
|
read log_line
|
|
while [[ -n "$log_line" ]]; do
|
|
echo "Received $log_line" >> $outfile
|
|
|
|
# Tell rsyslog we are ready to process the next message
|
|
echo "OK"
|
|
|
|
read log_line
|
|
done
|
|
|
|
echo "Terminating unresponsively" >> $outfile
|
|
|
|
# Terminate with a very long sleep, so omprog will kill this process when
|
|
# the closeTimeout (which we have configured to a short value) is reached.
|
|
# (Note hat the sleep subprocess itself will not be killed.)
|
|
sleep 150s
|
|
|
|
exit 0
|