Commit Graph

15 Commits

Author SHA1 Message Date
Mads Kiilerich
a9146eb8c4 test-serve: use service that works on more platforms
Follow-up to 40a2055abf6d: echo is ambiguous on OS/X, and Solaris have neither
http nor gopher. daytime seems to be available everywhere.
2010-09-28 02:57:59 +02:00
Mads Kiilerich
ed06ff3f48 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.
2010-09-25 02:35:32 +02:00
Brodie Rao
d1c9097d78 test-serve: ensure KILLQUIETLY is only used once
31d8c647c08d introduced a feature to the hgserve() function that
suppresses errors from kill(1). It wrongly assumed that setting an
environment variable when calling a function would make it local to
the function. It ended up suppressing kill errors for every call
thereafter.

This patch sets KILLQUIETLY=N after use.
2010-08-30 11:16:21 -04:00
Brodie Rao
d1905b7d87 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.
2010-08-28 12:31:07 -04:00
Thomas Arendsen Hein
45c7d43a59 test-serve: Show if port config and option are correctly used
this will break in c28f6e4ccb71
2010-03-10 22:05:41 +01:00
Dirkjan Ochtman
9700c3ce4c tests: easier error diagnostics for test-serve 2008-04-03 12:46:37 +02:00
Dirkjan Ochtman
187ae17c7e fix test-serve breakage for other hostnames 2008-03-20 22:58:53 +01:00
Patrick Mezard
6d9511f197 test-serve: replace copy/paste with shell function 2008-03-17 16:15:43 +01:00
Stephen Deasey
b6ba89dcec hgweb: clarify which address and port can/cannot be bound at startup (bug 769)
The error message at startup when the address/port could not be bound
was confusing:

    hg serve
    abort: cannot start server: Address already in use

Be more explicit:

    $ hg serve -a localhost
    abort: cannot start server at 'localhost:8000': Address already in use

Also be more explicit on success, showing hostname and ip address/port:

    $ hg -v serve -a localhost -p 80
    listening at http://localhost/ (127.0.0.1:80)


We are careful to handle a missconfigured machine whose hostname does not
resolve, falling back to the address given at the command line.

Remove a dead-code error message.
2008-03-10 19:25:34 +00:00
Thomas Arendsen Hein
da87e7b4ae test-serve: wait before killing to always hide the "killed!" message.
Without the sleeps slower systems never display never display "killed!"
while faster systems sometimes or nearly always display it.
2008-02-02 21:01:43 +01:00
Michele Cella
76206039da tests for hg serve prefix option 2008-01-22 23:06:37 +01:00
Bryan O'Sullivan
a03fea73e0 Allow tests to run in parallel. 2007-10-05 12:17:01 -07:00
Alexis S. L. Carvalho
3b07689b6a serve: respect settings from .hg/hgrc
create_server was looking only at the root ui object, ignoring any
settings from .hg/hgrc.  To keep respecting command-line arguments,
commands.serve must also call repo.ui.setconfig.
2007-07-11 19:56:16 -03:00
Alexis S. L. Carvalho
9473b6e676 test-serve: let run-tests.py kill the daemons
If the daemons die while the tests are still running, we'll get additional
"killed!" messages, making the test fail.
2007-06-05 19:26:36 -03:00
Joel Rosdahl
59069084bb Add test reproducing a bug in "hg serve -v" 2007-06-04 21:48:59 +02:00