##// END OF EJS Templates
test-static-http.t: enable on Windows...
Patrick Mezard -
r17538:31ca918d default
parent child Browse files
Show More
@@ -1,4 +1,4 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1 $ "$TESTDIR/hghave" killdaemons || exit 80
2 2
3 3 #if windows
4 4 $ hg clone http://localhost:$HGPORT/ copy
@@ -25,10 +25,27 b' one pull'
25 25 > httpd.serve_forever()
26 26 >
27 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 31 > run()
29 32 > EOF
30 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 50 $ cd remote
34 51 $ echo foo > bar
@@ -171,4 +188,4 b' test with non-repo'
171 188 $ hg clone static-http://localhost:$HGPORT/notarepo local3
172 189 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
173 190 [255]
174 $ kill $!
191 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
General Comments 0
You need to be logged in to leave comments. Login now