mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
945bc56a14
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Work-around failing tests/test-bad-pull with slow bg process. Without the 'sleep 2' python dumb.py often appeared after hg clone. manifest hash: b32381ac46a7691f2a92595b650b2406853644c2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCxOM+W7P1GVgWeRoRAjgTAJ9OqrikdK043Eiyyx9dG8DR1XZ7tgCggdmM AVYvAZO3P+WlaWDu3MaxEXY= =0XN5 -----END PGP SIGNATURE-----
28 lines
545 B
Bash
Executable File
28 lines
545 B
Bash
Executable File
#!/bin/sh -x
|
|
|
|
hg clone http://localhost:20059/ copy
|
|
echo $?
|
|
ls copy
|
|
|
|
cat > dumb.py <<EOF
|
|
import BaseHTTPServer, SimpleHTTPServer, signal
|
|
|
|
def run(server_class=BaseHTTPServer.HTTPServer,
|
|
handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
|
|
server_address = ('localhost', 20059)
|
|
httpd = server_class(server_address, handler_class)
|
|
httpd.serve_forever()
|
|
|
|
signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
|
|
run()
|
|
EOF
|
|
|
|
python dumb.py 2>/dev/null &
|
|
sleep 2
|
|
|
|
hg clone http://localhost:20059/foo copy2
|
|
echo $?
|
|
|
|
set +x
|
|
kill $!
|