tests/test-hgweb
changeset 5690 1b365c5723bc
parent 5580 f429e0e067a8
child 5924 b8009718a211
--- a/tests/test-hgweb	Mon Dec 24 12:22:33 2007 +0100
+++ b/tests/test-hgweb	Mon Dec 24 17:21:40 2007 +0100
@@ -7,7 +7,7 @@
 echo foo > da/foo
 echo foo > foo
 hg ci -Ambase -d '0 0'
-hg serve -p $HGPORT -d --pid-file=hg.pid
+hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
 cat hg.pid >> $DAEMON_PIDS
 echo % manifest
 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
@@ -28,5 +28,12 @@
 echo % should give a 404 - file does not exist
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
 
+echo % stop and restart
+kill `cat hg.pid`
+hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
+cat hg.pid >> $DAEMON_PIDS
+# Test the access/error files are opened in append mode
+python -c "print len(file('access.log').readlines()), 'log lines written'"
+
 echo % static file
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'