Show More
@@ -1,30 +1,34 | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | hg clone http://localhost:$HGPORT/ copy | |
|
4 | echo $? | |
|
5 | test -d copy || echo copy: No such file or directory | |
|
1 | $ hg clone http://localhost:$HGPORT/ copy | |
|
2 | abort: error: Connection refused | |
|
6 | 3 | |
|
7 | cat > dumb.py <<EOF | |
|
8 | import BaseHTTPServer, SimpleHTTPServer, os, signal | |
|
4 | $ echo $? | |
|
5 | 0 | |
|
9 | 6 | |
|
10 | def run(server_class=BaseHTTPServer.HTTPServer, | |
|
11 | handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): | |
|
12 | server_address = ('localhost', int(os.environ['HGPORT'])) | |
|
13 | httpd = server_class(server_address, handler_class) | |
|
14 | httpd.serve_forever() | |
|
7 | $ test -d copy || echo copy: No such file or directory | |
|
8 | copy: No such file or directory | |
|
15 | 9 | |
|
16 | signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) | |
|
17 | run() | |
|
18 | EOF | |
|
19 | ||
|
20 | python dumb.py 2>/dev/null & | |
|
21 | echo $! >> $DAEMON_PIDS | |
|
10 | $ cat > dumb.py <<EOF | |
|
11 | > import BaseHTTPServer, SimpleHTTPServer, os, signal | |
|
12 | > def run(server_class=BaseHTTPServer.HTTPServer, | |
|
13 | > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler): | |
|
14 | > server_address = ('localhost', int(os.environ['HGPORT'])) | |
|
15 | > httpd = server_class(server_address, handler_class) | |
|
16 | > httpd.serve_forever() | |
|
17 | > signal.signal(signal.SIGTERM, lambda x: sys.exit(0)) | |
|
18 | > run() | |
|
19 | > EOF | |
|
22 | 20 | |
|
23 | # give the server some time to start running | |
|
24 | sleep 1 | |
|
21 | $ python dumb.py 2>/dev/null & | |
|
22 | $ echo $! >> $DAEMON_PIDS | |
|
23 | ||
|
24 | give the server some time to start running | |
|
25 | ||
|
26 | $ sleep 1 | |
|
25 | 27 | |
|
26 |
hg clone http://localhost:$HGPORT/foo copy2 2>&1 |
|
|
27 | sed -e 's/404.*/404/' -e 's/Date:.*/Date:/' | |
|
28 | echo $? | |
|
28 | $ hg clone http://localhost:$HGPORT/foo copy2 2>&1 | |
|
29 | abort: HTTP Error 404: .* | |
|
29 | 30 | |
|
30 | kill $! | |
|
31 | $ echo $? | |
|
32 | 0 | |
|
33 | ||
|
34 | $ kill $! |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now