comparison tests/test-https.t @ 16300:74e114ac6ec1 stable

tests: fix startup/shutdown races in test-https tinyproxy now writes its own pid when it's ready to accept connections
author Matt Mackall <mpm@selenic.com>
date Wed, 28 Mar 2012 19:23:25 -0500
parents a3dcc59054ca
children abbabbbe4ec2
comparison
equal deleted inserted replaced
16299:853ffcafecfa 16300:74e114ac6ec1
231 231
232 - ignores that certificate doesn't match hostname 232 - ignores that certificate doesn't match hostname
233 $ hg -R copy-pull id https://127.0.0.1:$HGPORT/ 233 $ hg -R copy-pull id https://127.0.0.1:$HGPORT/
234 5fed3813f7f5 234 5fed3813f7f5
235 235
236 $ while kill `cat hg1.pid` 2>/dev/null; do true; done
237
236 Prepare for connecting through proxy 238 Prepare for connecting through proxy
237 239
238 $ kill `cat hg1.pid` 240 $ "$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log </dev/null 2>&1 &
239 $ sleep 1 241 $ while [ ! -f proxy.pid ]; do true; done
240
241 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
242 $ echo $! > proxy.pid)
243 $ cat proxy.pid >> $DAEMON_PIDS 242 $ cat proxy.pid >> $DAEMON_PIDS
244 $ sleep 2
245 243
246 $ echo "[http_proxy]" >> copy-pull/.hg/hgrc 244 $ echo "[http_proxy]" >> copy-pull/.hg/hgrc
247 $ echo "always=True" >> copy-pull/.hg/hgrc 245 $ echo "always=True" >> copy-pull/.hg/hgrc
248 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc 246 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
249 $ echo "localhost =" >> copy-pull/.hg/hgrc 247 $ echo "localhost =" >> copy-pull/.hg/hgrc