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