sapling/tests/test-bad-pull
Thomas Arendsen Hein 945bc56a14 Work-around failing tests/test-bad-pull with slow bg process.
-----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-----
2005-07-01 07:31:26 +01:00

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 $!