test-serve: fix test for binding to low named port on solaris
authorMads Kiilerich <mads@kiilerich.com>
Sat, 25 Sep 2010 02:35:32 +0200
changeset 12403 ba8850911703
parent 12402 b014f998959d
child 12404 f33a5d1c937e
test-serve: fix test for binding to low named port on solaris Solaris do not know the service called http, so we use echo instead. Trying to define KILLQUIETLY when running the hgserve function didn't set the value within the function. Now we set the variable before calling the function.
tests/test-serve
tests/test-serve.out
--- a/tests/test-serve	Tue Sep 21 23:55:32 2010 +0200
+++ b/tests/test-serve	Sat Sep 25 02:35:32 2010 +0200
@@ -40,8 +40,10 @@
 echo % With -v and -p HGPORT2
 hgserve -p "$HGPORT2"
 
-echo '% With -v and -p http (should fail)'
-KILLQUIETLY=Y hgserve -p http; KILLQUIETLY=N
+echo '% With -v and -p echo (should fail because low port)'
+KILLQUIETLY=Y
+hgserve -p echo
+KILLQUIETLY=N
 
 echo % With --prefix foo
 hgserve --prefix foo
--- a/tests/test-serve.out	Tue Sep 21 23:55:32 2010 +0200
+++ b/tests/test-serve.out	Sat Sep 25 02:35:32 2010 +0200
@@ -7,8 +7,8 @@
 % With -v and -p HGPORT2
 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
 % errors
-% With -v and -p http (should fail)
-abort: cannot start server at 'localhost:80': Permission denied
+% With -v and -p echo (should fail because low port)
+abort: cannot start server at 'localhost:7': Permission denied
 abort: child process failed to start
 % errors
 % With --prefix foo