better error reporting for hg serve errors in tests
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Tue, 22 Jan 2008 09:11:11 +0100
changeset 5924 b8009718a211
parent 5923 f39110afc039
child 5925 c6274913eba5
better error reporting for hg serve errors in tests
tests/test-archive
tests/test-archive.out
tests/test-hgweb
tests/test-hgweb.out
--- a/tests/test-archive	Tue Jan 22 09:11:08 2008 +0100
+++ b/tests/test-archive	Tue Jan 22 09:11:11 2008 +0100
@@ -13,7 +13,7 @@
 echo "[web]" >> .hg/hgrc
 echo "name = test-archive" >> .hg/hgrc
 echo "allow_archive = gz bz2, zip" >> .hg/hgrc
-hg serve -p $HGPORT -d --pid-file=hg.pid
+hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
 cat hg.pid >> $DAEMON_PIDS
 
 TIP=`hg id -v | cut -f1 -d' '`
@@ -69,8 +69,12 @@
     echo 'rev-0.tar created'
 fi
 
+echo % server errors
+cat errors.log
+
 echo '% empty repo'
 hg init ../empty
 cd ../empty
 hg archive ../test-empty
+
 exit 0
--- a/tests/test-archive.out	Tue Jan 22 09:11:08 2008 +0100
+++ b/tests/test-archive.out	Tue Jan 22 09:11:11 2008 +0100
@@ -39,5 +39,6 @@
 test-TIP/baz/bletch
 test-TIP/foo
 rev-0.tar created
+% server errors
 % empty repo
 abort: repository has no revisions
--- a/tests/test-hgweb	Tue Jan 22 09:11:08 2008 +0100
+++ b/tests/test-hgweb	Tue Jan 22 09:11:11 2008 +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 -A access.log
+hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
 cat hg.pid >> $DAEMON_PIDS
 echo % manifest
 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
@@ -37,3 +37,6 @@
 
 echo % static file
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/style-gitweb.css'
+
+echo % errors
+cat errors.log
--- a/tests/test-hgweb.out	Tue Jan 22 09:11:08 2008 +0100
+++ b/tests/test-hgweb.out	Tue Jan 22 09:11:11 2008 +0100
@@ -136,3 +136,4 @@
 	background-color: #aaffaa;
 	border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
 }
+% errors