3 # Run privoxy-regression-test.pl on a configuration extended by
4 # regression-tests.action.
6 # (c) 2018 Roland Rosenfeld <roland@debian.org>
10 if [ -z "$AUTOPKGTEST_TMP" ]; then
11 AUTOPKGTEST_TMP=$(mktemp -d)
14 trap "rm -rf $AUTOPKGTEST_TMP" EXIT
16 CONFIG=$AUTOPKGTEST_TMP/config
17 PIDFILE=$AUTOPKGTEST_TMP/privoxy.pid
18 sed -e "s/^listen-address.*/listen-address 127.0.0.1:$PORT/" \
19 -e "s%^logdir.*%logdir $AUTOPKGTEST_TMP%" \
20 -e "s/^enable-edit-actions.*/enable-edit-actions 1/" \
21 -e "s/^keep-alive-timeout.*/keep-alive-timeout 21/" \
22 -e "s/^#connection-sharing.*/connection-sharing 1/" \
23 < /usr/share/privoxy/config > $CONFIG
24 echo "actionsfile regression-tests.action" >> $CONFIG
26 echo "Starting privoxy on port $PORT"
27 /usr/sbin/privoxy --pidfile $PIDFILE $CONFIG
29 http_proxy=http://127.0.0.1:$PORT/
32 OUTFILE=$AUTOPKGTEST_TMP/output
34 /usr/bin/privoxy-regression-test --max-level 200 --show-skipped-tests \
37 echo "Stopping privoxy on port $PORT"
40 if grep -q 'Executed.*, 0 failures.' $OUTFILE