3 # Run privoxy-regression-test.pl on a configuration extended by
4 # regression-tests.action.
6 # (c) 2018-2021 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 PRIVOXY=$AUTOPKGTEST_TMP/privoxy
20 sed -e "s/^listen-address.*/listen-address 127.0.0.1:$PORT/" \
21 -e "s%^logdir.*%logdir $AUTOPKGTEST_TMP%" \
22 -e "s/^enable-edit-actions.*/enable-edit-actions 1/" \
23 -e "s/^keep-alive-timeout.*/keep-alive-timeout 21/" \
24 -e "s/^#connection-sharing.*/connection-sharing 1/" \
25 < /usr/share/privoxy/config > $CONFIG
26 echo "actionsfile regression-tests.action" >> $CONFIG
28 cp /usr/sbin/privoxy $PRIVOXY
30 echo "Starting privoxy on port $PORT"
31 $PRIVOXY --pidfile $PIDFILE $CONFIG
33 http_proxy=http://127.0.0.1:$PORT/
36 OUTFILE=$AUTOPKGTEST_TMP/output
38 /usr/bin/privoxy-regression-test --max-level 200 --show-skipped-tests \
41 echo "Stopping privoxy on port $PORT"
44 if grep -q 'Executed.*, 0 failures.' $OUTFILE