Mercurial > hg-stable
annotate tests/test-bad-pull.t @ 12551:252d616bc2c0
i18n-de: delete language duplicate, update last-translator
author | Martin Roppelt <m.p.roppelt@web.de> |
---|---|
date | Wed, 22 Sep 2010 09:45:14 +0200 |
parents | 4134686b83e1 |
children | 22f3353bcc36 |
rev | line source |
---|---|
11859
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
1 $ hg clone http://localhost:$HGPORT/ copy |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
2 abort: error: Connection refused |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11859
diff
changeset
|
3 [255] |
395 | 4 |
11859
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
5 $ echo $? |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
6 0 |
395 | 7 |
11859
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
8 $ test -d copy || echo copy: No such file or directory |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
9 copy: No such file or directory |
395 | 10 |
11859
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
11 $ cat > dumb.py <<EOF |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
12 > import BaseHTTPServer, SimpleHTTPServer, os, signal |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
13 > def run(server_class=BaseHTTPServer.HTTPServer, |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
14 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
15 > server_address = ('localhost', int(os.environ['HGPORT'])) |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
16 > httpd = server_class(server_address, handler_class) |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
17 > httpd.serve_forever() |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
18 > signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
19 > run() |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
20 > EOF |
395 | 21 |
11859
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
22 $ python dumb.py 2>/dev/null & |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
23 $ echo $! >> $DAEMON_PIDS |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
24 |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
25 give the server some time to start running |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
26 |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
27 $ sleep 1 |
4317
66249be9aa23
test-bad-pull: try to avoid timing-related failures
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
3469
diff
changeset
|
28 |
11859
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
29 $ hg clone http://localhost:$HGPORT/foo copy2 2>&1 |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
30 abort: HTTP Error 404: .* |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
11859
diff
changeset
|
31 [255] |
395 | 32 |
11859
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
33 $ echo $? |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
34 0 |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
35 |
f48178034569
tests: unify test-bad-pull
Martin Geisler <mg@lazybytes.net>
parents:
10154
diff
changeset
|
36 $ kill $! |