diff tests/test-serve @ 12076:49463314c24f

mail/hgweb: support service names for ports (issue2350) This adds util.getport(port) which tries to parse port as an int, and failing that, looks it up using socket.getservbyname(). Thus, the following will work: [smtp] port = submission [web] port = http This does not apply to ports in URLs used in clone, pull, etc.
author Brodie Rao <brodie@bitheap.org>
date Sat, 28 Aug 2010 12:31:07 -0400
parents 3318431f2ab4
children b6cc68ef2702
line wrap: on
line diff
--- a/tests/test-serve	Fri Aug 27 16:25:47 2010 +0200
+++ b/tests/test-serve	Sat Aug 28 12:31:07 2010 -0400
@@ -10,7 +10,11 @@
     echo % errors
     cat errors.log
     sleep 1
-    kill `cat hg.pid`
+    if [ "$KILLQUIETLY" = "Y" ]; then
+        kill `cat hg.pid` 2>/dev/null
+    else
+        kill `cat hg.pid`
+    fi
     sleep 1
 }
 
@@ -36,6 +40,9 @@
 echo % With -v and -p HGPORT2
 hgserve -p "$HGPORT2"
 
+echo '% With -v and -p http (should fail)'
+KILLQUIETLY=Y hgserve -p http
+
 echo % With --prefix foo
 hgserve --prefix foo