Show More
@@ -1,4 +1,4 b'' | |||||
1 |
$ "$TESTDIR/hghave" |
|
1 | $ "$TESTDIR/hghave" killdaemons || exit 80 | |
2 |
|
2 | |||
3 | #if windows |
|
3 | #if windows | |
4 | $ hg clone http://localhost:$HGPORT/ copy |
|
4 | $ hg clone http://localhost:$HGPORT/ copy | |
@@ -25,10 +25,27 b' one pull' | |||||
25 | > httpd.serve_forever() |
|
25 | > httpd.serve_forever() | |
26 | > |
|
26 | > | |
27 | > signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0)) |
|
27 | > signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0)) | |
|
28 | > fp = file('dumb.pid', 'wb') | |||
|
29 | > fp.write(str(os.getpid()) + '\n') | |||
|
30 | > fp.close() | |||
28 | > run() |
|
31 | > run() | |
29 | > EOF |
|
32 | > EOF | |
30 | $ python dumb.py 2>/dev/null & |
|
33 | $ python dumb.py 2>/dev/null & | |
31 | $ echo $! >> $DAEMON_PIDS |
|
34 | ||
|
35 | Cannot just read $!, it will not be set to the right value on Windows/MinGW | |||
|
36 | ||||
|
37 | $ cat > wait.py <<EOF | |||
|
38 | > import time | |||
|
39 | > while True: | |||
|
40 | > try: | |||
|
41 | > if '\n' in file('dumb.pid', 'rb').read(): | |||
|
42 | > break | |||
|
43 | > except IOError: | |||
|
44 | > pass | |||
|
45 | > time.sleep(0.2) | |||
|
46 | > EOF | |||
|
47 | $ python wait.py | |||
|
48 | $ cat dumb.pid >> $DAEMON_PIDS | |||
32 |
$ |
|
49 | $ hg init remote | |
33 | $ cd remote |
|
50 | $ cd remote | |
34 | $ echo foo > bar |
|
51 | $ echo foo > bar | |
@@ -171,4 +188,4 b' test with non-repo' | |||||
171 | $ hg clone static-http://localhost:$HGPORT/notarepo local3 |
|
188 | $ hg clone static-http://localhost:$HGPORT/notarepo local3 | |
172 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! |
|
189 | abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository! | |
173 | [255] |
|
190 | [255] | |
174 | $ kill $! |
|
191 | $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
General Comments 0
You need to be logged in to leave comments.
Login now