##// END OF EJS Templates
tests: use 'hghave serve' to guard tests that requires serve daemon management
Mads Kiilerich -
r15446:c5c9ca37 default
parent child Browse files
Show More
@@ -215,6 +215,9 b' def has_windows():'
215 def has_system_sh():
215 def has_system_sh():
216 return os.name != 'nt'
216 return os.name != 'nt'
217
217
218 def has_serve():
219 return os.name != 'nt' # gross approximation
220
218 checks = {
221 checks = {
219 "baz": (has_baz, "GNU Arch baz client"),
222 "baz": (has_baz, "GNU Arch baz client"),
220 "bzr": (has_bzr, "Canonical's Bazaar client"),
223 "bzr": (has_bzr, "Canonical's Bazaar client"),
@@ -237,6 +240,7 b' checks = {'
237 "p4": (has_p4, "Perforce server and client"),
240 "p4": (has_p4, "Perforce server and client"),
238 "pyflakes": (has_pyflakes, "Pyflakes python linter"),
241 "pyflakes": (has_pyflakes, "Pyflakes python linter"),
239 "pygments": (has_pygments, "Pygments source highlighting library"),
242 "pygments": (has_pygments, "Pygments source highlighting library"),
243 "serve": (has_serve, "platform and python can manage 'hg serve -d'"),
240 "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
244 "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
241 "svn": (has_svn, "subversion client and admin tools"),
245 "svn": (has_svn, "subversion client and admin tools"),
242 "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
246 "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3 $ echo foo>foo
5 $ echo foo>foo
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg clone http://localhost:$HGPORT/ copy
3 $ hg clone http://localhost:$HGPORT/ copy
2 abort: error: Connection refused
4 abort: error: Connection refused
3 [255]
5 [255]
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 initialize
3 initialize
2
4
3 $ hg init a
5 $ hg init a
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "fetch=" >> $HGRCPATH
4 $ echo "fetch=" >> $HGRCPATH
3
5
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 = Test the getbundle() protocol function =
3 = Test the getbundle() protocol function =
3
4
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 An attempt at more fully testing the hgweb web interface.
3 An attempt at more fully testing the hgweb web interface.
2 The following things are tested elsewhere and are therefore omitted:
4 The following things are tested elsewhere and are therefore omitted:
3 - archive, tested in test-archive
5 - archive, tested in test-archive
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Test chains of near empty directories, terminating 3 different ways:
3 Test chains of near empty directories, terminating 3 different ways:
2 - a1: file at level 4 (deepest)
4 - a1: file at level 4 (deepest)
3 - b1: two dirs at level 3
5 - b1: two dirs at level 3
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" execbit || exit 80
1 $ "$TESTDIR/hghave" serve execbit || exit 80
2
2
3 setting up repo
3 setting up repo
4
4
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Some tests for hgweb in an empty repository
3 Some tests for hgweb in an empty repository
2
4
3 $ hg init test
5 $ hg init test
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Test raw style of hgweb
3 Test raw style of hgweb
2
4
3 $ hg init test
5 $ hg init test
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 setting up repo
3 setting up repo
2
4
3 $ hg init test
5 $ hg init test
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Some tests for hgweb. Tests static files, plain files and different 404's.
3 Some tests for hgweb. Tests static files, plain files and different 404's.
2
4
3 $ hg init test
5 $ hg init test
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Tests some basic hgwebdir functionality. Tests setting up paths and
3 Tests some basic hgwebdir functionality. Tests setting up paths and
2 collection, different forms of 404s and the subdirectory support.
4 collection, different forms of 404s and the subdirectory support.
3
5
@@ -1,6 +1,6 b''
1 Tests whether or not hgwebdir properly handles various symlink topologies.
1 Tests whether or not hgwebdir properly handles various symlink topologies.
2
2
3 $ "$TESTDIR/hghave" symlink || exit 80
3 $ "$TESTDIR/hghave" serve symlink || exit 80
4 $ hg init a
4 $ hg init a
5 $ echo a > a/a
5 $ echo a > a/a
6 $ hg --cwd a ci -Ama -d'1 0'
6 $ hg --cwd a ci -Ama -d'1 0'
@@ -1,5 +1,5 b''
1
1
2 $ "$TESTDIR/hghave" pygments || exit 80
2 $ "$TESTDIR/hghave" pygments serve || exit 80
3 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
4 > [extensions]
4 > [extensions]
5 > highlight =
5 > highlight =
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hgserve() {
3 $ hgserve() {
3 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
4 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 creating 'remote
3 creating 'remote
2
4
3 $ hg init remote
5 $ hg init remote
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init a
3 $ hg init a
3 $ cd a
4 $ cd a
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
@@ -1,6 +1,6 b''
1 Proper https client requires the built-in ssl from Python 2.6.
1 Proper https client requires the built-in ssl from Python 2.6.
2
2
3 $ "$TESTDIR/hghave" ssl || exit 80
3 $ "$TESTDIR/hghave" serve ssl || exit 80
4
4
5 Certificates created with:
5 Certificates created with:
6 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
6 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
@@ -1,6 +1,6 b''
1 Test hangup signal in the middle of transaction
1 Test hangup signal in the middle of transaction
2
2
3 $ "$TESTDIR/hghave" fifo || exit 80
3 $ "$TESTDIR/hghave" serve fifo || exit 80
4 $ hg init
4 $ hg init
5 $ mkfifo p
5 $ mkfifo p
6 $ hg serve --stdio < p &
6 $ hg serve --stdio < p &
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" no-outer-repo || exit 80
1 $ "$TESTDIR/hghave" no-outer-repo serve || exit 80
2
2
3 no repo
3 no repo
4
4
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3 $ for i in 0 1 2 3 4 5 6 7 8; do
5 $ for i in 0 1 2 3 4 5 6 7 8; do
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3
5
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions || exit 80
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
2
2
3 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
4 > [extensions]
4 > [extensions]
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 = Test the known() protocol function =
3 = Test the known() protocol function =
3
4
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions || exit 80
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
2
2
3 $ cat >> $HGRCPATH <<EOF
3 $ cat >> $HGRCPATH <<EOF
4 > [extensions]
4 > [extensions]
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "mq=" >> $HGRCPATH
4 $ echo "mq=" >> $HGRCPATH
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ cat > writelines.py <<EOF
3 $ cat > writelines.py <<EOF
3 > import sys
4 > import sys
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3
5
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 setup repo
3 setup repo
2 $ hg init t
4 $ hg init t
3 $ cd t
5 $ cd t
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
3 > [extensions]
4 > [extensions]
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hgserve()
3 $ hgserve()
3 > {
4 > {
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "share = " >> $HGRCPATH
4 $ echo "share = " >> $HGRCPATH
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg clone http://localhost:$HGPORT/ copy
3 $ hg clone http://localhost:$HGPORT/ copy
3 abort: error: Connection refused
4 abort: error: Connection refused
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Preparing the subrepository 'sub'
3 Preparing the subrepository 'sub'
2
4
3 $ hg init sub
5 $ hg init sub
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
2 > [extensions]
4 > [extensions]
3 > transplant=
5 > transplant=
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Tests discovery against servers without getbundle support:
3 Tests discovery against servers without getbundle support:
2
4
3 $ cat >> $HGRCPATH <<EOF
5 $ cat >> $HGRCPATH <<EOF
@@ -1,3 +1,5 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Tests discovery against servers without getbundle support:
3 Tests discovery against servers without getbundle support:
2
4
3 $ CAP=getbundle
5 $ CAP=getbundle
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 Test wire protocol unbundle with hashed heads (capability: unbundlehash)
3 Test wire protocol unbundle with hashed heads (capability: unbundlehash)
3
4
@@ -1,3 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 Test wire protocol argument passing
3 Test wire protocol argument passing
3
4
General Comments 0
You need to be logged in to leave comments. Login now