##// END OF EJS Templates
test-bad-pull: partially adjust for Windows...
Adrian Buehlmann -
r17019:5d053859 default
parent child Browse files
Show More
@@ -1,27 +1,33 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" serve || exit 80
2
2
3 #if windows
4 $ hg clone http://localhost:$HGPORT/ copy
5 abort: * (glob)
6 [255]
7 #else
3 $ hg clone http://localhost:$HGPORT/ copy
8 $ hg clone http://localhost:$HGPORT/ copy
4 abort: error: Connection refused
9 abort: error: Connection refused
5 [255]
10 [255]
11 #endif
6
12
7 $ test -d copy
13 $ test -d copy
8 [1]
14 [1]
9
15
10 $ cat > dumb.py <<EOF
16 $ cat > dumb.py <<EOF
11 > import BaseHTTPServer, SimpleHTTPServer, os, signal
17 > import BaseHTTPServer, SimpleHTTPServer, os, signal
12 > def run(server_class=BaseHTTPServer.HTTPServer,
18 > def run(server_class=BaseHTTPServer.HTTPServer,
13 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
19 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
14 > server_address = ('localhost', int(os.environ['HGPORT']))
20 > server_address = ('localhost', int(os.environ['HGPORT']))
15 > httpd = server_class(server_address, handler_class)
21 > httpd = server_class(server_address, handler_class)
16 > open("listening", "w")
22 > open("listening", "w")
17 > httpd.handle_request()
23 > httpd.handle_request()
18 > run()
24 > run()
19 > EOF
25 > EOF
20
26
21 $ python dumb.py 2> log &
27 $ python dumb.py 2> log &
22 $ P=$!
28 $ P=$!
23 $ while [ ! -f listening ]; do sleep 0; done
29 $ while [ ! -f listening ]; do sleep 0; done
24 $ hg clone http://localhost:$HGPORT/foo copy2
30 $ hg clone http://localhost:$HGPORT/foo copy2
25 abort: HTTP Error 404: * (glob)
31 abort: HTTP Error 404: * (glob)
26 [255]
32 [255]
27 $ wait $P
33 $ wait $P
General Comments 0
You need to be logged in to leave comments. Login now