diff --git a/tests/hghave b/tests/hghave --- a/tests/hghave +++ b/tests/hghave @@ -215,6 +215,9 @@ def has_windows(): def has_system_sh(): return os.name != 'nt' +def has_serve(): + return os.name != 'nt' # gross approximation + checks = { "baz": (has_baz, "GNU Arch baz client"), "bzr": (has_bzr, "Canonical's Bazaar client"), @@ -237,6 +240,7 @@ checks = { "p4": (has_p4, "Perforce server and client"), "pyflakes": (has_pyflakes, "Pyflakes python linter"), "pygments": (has_pygments, "Pygments source highlighting library"), + "serve": (has_serve, "platform and python can manage 'hg serve -d'"), "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"), "svn": (has_svn, "subversion client and admin tools"), "svn13": (has_svn13, "subversion client and admin tools >= 1.3"), diff --git a/tests/test-archive.t b/tests/test-archive.t --- a/tests/test-archive.t +++ b/tests/test-archive.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + $ hg init test $ cd test $ echo foo>foo diff --git a/tests/test-bad-pull.t b/tests/test-bad-pull.t --- a/tests/test-bad-pull.t +++ b/tests/test-bad-pull.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + $ hg clone http://localhost:$HGPORT/ copy abort: error: Connection refused [255] diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t --- a/tests/test-bookmarks-pushpull.t +++ b/tests/test-bookmarks-pushpull.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + initialize $ hg init a diff --git a/tests/test-fetch.t b/tests/test-fetch.t --- a/tests/test-fetch.t +++ b/tests/test-fetch.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + $ echo "[extensions]" >> $HGRCPATH $ echo "fetch=" >> $HGRCPATH diff --git a/tests/test-getbundle.t b/tests/test-getbundle.t --- a/tests/test-getbundle.t +++ b/tests/test-getbundle.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 = Test the getbundle() protocol function = diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t --- a/tests/test-hgweb-commands.t +++ b/tests/test-hgweb-commands.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + An attempt at more fully testing the hgweb web interface. The following things are tested elsewhere and are therefore omitted: - archive, tested in test-archive diff --git a/tests/test-hgweb-descend-empties.t b/tests/test-hgweb-descend-empties.t --- a/tests/test-hgweb-descend-empties.t +++ b/tests/test-hgweb-descend-empties.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + Test chains of near empty directories, terminating 3 different ways: - a1: file at level 4 (deepest) - b1: two dirs at level 3 diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t --- a/tests/test-hgweb-diffs.t +++ b/tests/test-hgweb-diffs.t @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" execbit || exit 80 + $ "$TESTDIR/hghave" serve execbit || exit 80 setting up repo diff --git a/tests/test-hgweb-empty.t b/tests/test-hgweb-empty.t --- a/tests/test-hgweb-empty.t +++ b/tests/test-hgweb-empty.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + Some tests for hgweb in an empty repository $ hg init test diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t --- a/tests/test-hgweb-filelog.t +++ b/tests/test-hgweb-filelog.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hg init test $ cd test diff --git a/tests/test-hgweb-raw.t b/tests/test-hgweb-raw.t --- a/tests/test-hgweb-raw.t +++ b/tests/test-hgweb-raw.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + Test raw style of hgweb $ hg init test diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t --- a/tests/test-hgweb-removed.t +++ b/tests/test-hgweb-removed.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + setting up repo $ hg init test diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t --- a/tests/test-hgweb.t +++ b/tests/test-hgweb.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + Some tests for hgweb. Tests static files, plain files and different 404's. $ hg init test diff --git a/tests/test-hgwebdir.t b/tests/test-hgwebdir.t --- a/tests/test-hgwebdir.t +++ b/tests/test-hgwebdir.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + Tests some basic hgwebdir functionality. Tests setting up paths and collection, different forms of 404s and the subdirectory support. diff --git a/tests/test-hgwebdirsym.t b/tests/test-hgwebdirsym.t --- a/tests/test-hgwebdirsym.t +++ b/tests/test-hgwebdirsym.t @@ -1,6 +1,6 @@ Tests whether or not hgwebdir properly handles various symlink topologies. - $ "$TESTDIR/hghave" symlink || exit 80 + $ "$TESTDIR/hghave" serve symlink || exit 80 $ hg init a $ echo a > a/a $ hg --cwd a ci -Ama -d'1 0' diff --git a/tests/test-highlight.t b/tests/test-highlight.t --- a/tests/test-highlight.t +++ b/tests/test-highlight.t @@ -1,5 +1,5 @@ - $ "$TESTDIR/hghave" pygments || exit 80 + $ "$TESTDIR/hghave" pygments serve || exit 80 $ cat <> $HGRCPATH > [extensions] > highlight = diff --git a/tests/test-http-branchmap.t b/tests/test-http-branchmap.t --- a/tests/test-http-branchmap.t +++ b/tests/test-http-branchmap.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hgserve() { > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@ diff --git a/tests/test-http-clone-r.t b/tests/test-http-clone-r.t --- a/tests/test-http-clone-r.t +++ b/tests/test-http-clone-r.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + creating 'remote $ hg init remote diff --git a/tests/test-http-proxy.t b/tests/test-http-proxy.t --- a/tests/test-http-proxy.t +++ b/tests/test-http-proxy.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hg init a $ cd a diff --git a/tests/test-http.t b/tests/test-http.t --- a/tests/test-http.t +++ b/tests/test-http.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hg init test $ cd test diff --git a/tests/test-https.t b/tests/test-https.t --- a/tests/test-https.t +++ b/tests/test-https.t @@ -1,6 +1,6 @@ Proper https client requires the built-in ssl from Python 2.6. - $ "$TESTDIR/hghave" ssl || exit 80 + $ "$TESTDIR/hghave" serve ssl || exit 80 Certificates created with: printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \ diff --git a/tests/test-hup.t b/tests/test-hup.t --- a/tests/test-hup.t +++ b/tests/test-hup.t @@ -1,6 +1,6 @@ Test hangup signal in the middle of transaction - $ "$TESTDIR/hghave" fifo || exit 80 + $ "$TESTDIR/hghave" serve fifo || exit 80 $ hg init $ mkfifo p $ hg serve --stdio < p & diff --git a/tests/test-identify.t b/tests/test-identify.t --- a/tests/test-identify.t +++ b/tests/test-identify.t @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" no-outer-repo || exit 80 + $ "$TESTDIR/hghave" no-outer-repo serve || exit 80 no repo diff --git a/tests/test-incoming-outgoing.t b/tests/test-incoming-outgoing.t --- a/tests/test-incoming-outgoing.t +++ b/tests/test-incoming-outgoing.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + $ hg init test $ cd test $ for i in 0 1 2 3 4 5 6 7 8; do diff --git a/tests/test-interhg.t b/tests/test-interhg.t --- a/tests/test-interhg.t +++ b/tests/test-interhg.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + $ hg init test $ cd test diff --git a/tests/test-keyword.t b/tests/test-keyword.t --- a/tests/test-keyword.t +++ b/tests/test-keyword.t @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" symlink unix-permissions || exit 80 + $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 $ cat <> $HGRCPATH > [extensions] diff --git a/tests/test-known.t b/tests/test-known.t --- a/tests/test-known.t +++ b/tests/test-known.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 = Test the known() protocol function = diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" symlink unix-permissions || exit 80 + $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80 $ cat >> $HGRCPATH < [extensions] diff --git a/tests/test-mq-qclone-http.t b/tests/test-mq-qclone-http.t --- a/tests/test-mq-qclone-http.t +++ b/tests/test-mq-qclone-http.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ echo "[extensions]" >> $HGRCPATH $ echo "mq=" >> $HGRCPATH diff --git a/tests/test-mq-qimport.t b/tests/test-mq-qimport.t --- a/tests/test-mq-qimport.t +++ b/tests/test-mq-qimport.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ cat > writelines.py < import sys diff --git a/tests/test-pull-http.t b/tests/test-pull-http.t --- a/tests/test-pull-http.t +++ b/tests/test-pull-http.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hg init test $ cd test diff --git a/tests/test-pull.t b/tests/test-pull.t --- a/tests/test-pull.t +++ b/tests/test-pull.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + $ hg init test $ cd test diff --git a/tests/test-push-http.t b/tests/test-push-http.t --- a/tests/test-push-http.t +++ b/tests/test-push-http.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hg init test $ cd test diff --git a/tests/test-rollback.t b/tests/test-rollback.t --- a/tests/test-rollback.t +++ b/tests/test-rollback.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + setup repo $ hg init t $ cd t diff --git a/tests/test-schemes.t b/tests/test-schemes.t --- a/tests/test-schemes.t +++ b/tests/test-schemes.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ cat <> $HGRCPATH > [extensions] diff --git a/tests/test-serve.t b/tests/test-serve.t --- a/tests/test-serve.t +++ b/tests/test-serve.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hgserve() > { diff --git a/tests/test-share.t b/tests/test-share.t --- a/tests/test-share.t +++ b/tests/test-share.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ echo "[extensions]" >> $HGRCPATH $ echo "share = " >> $HGRCPATH diff --git a/tests/test-static-http.t b/tests/test-static-http.t --- a/tests/test-static-http.t +++ b/tests/test-static-http.t @@ -1,3 +1,4 @@ + $ "$TESTDIR/hghave" serve || exit 80 $ hg clone http://localhost:$HGPORT/ copy abort: error: Connection refused diff --git a/tests/test-subrepo-relative-path.t b/tests/test-subrepo-relative-path.t --- a/tests/test-subrepo-relative-path.t +++ b/tests/test-subrepo-relative-path.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + Preparing the subrepository 'sub' $ hg init sub diff --git a/tests/test-transplant.t b/tests/test-transplant.t --- a/tests/test-transplant.t +++ b/tests/test-transplant.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + $ cat <> $HGRCPATH > [extensions] > transplant= diff --git a/tests/test-treediscovery-legacy.t b/tests/test-treediscovery-legacy.t --- a/tests/test-treediscovery-legacy.t +++ b/tests/test-treediscovery-legacy.t @@ -1,3 +1,5 @@ + $ "$TESTDIR/hghave" serve || exit 80 + Tests discovery against servers without getbundle support: $ cat >> $HGRCPATH <