mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
1c315e5afa
Summary: Requiring that developers use the run-tests from the core hg repo has some downsides: 1) It forces the tests to run against whatever version of Mercurial I have checked out right now. I usually want to run tests against my installed Mercurial (since we're likely to deploy a new fb-hgext without a new hg). 2) It makes it harder for people to contribute. Someone wrote a new extension, and in order for them to test it, I have to explain how to checkout hg and how to run tests using the hg run-tests and first they must checkout the rev we have deployed, not @. Test Plan: Ran the tests Reviewers: pyd, cdelahousse, #sourcecontrol Subscribers: ps Differential Revision: https://phabricator.fb.com/D2632574
25 lines
516 B
Python
Executable File
25 lines
516 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import sys
|
|
import os
|
|
|
|
os.chdir(os.getenv('TESTTMP'))
|
|
|
|
if sys.argv[1] != "user@dummy":
|
|
sys.exit(-1)
|
|
|
|
os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
|
|
|
|
log = open("dummylog", "ab")
|
|
log.write("Got arguments")
|
|
for i, arg in enumerate(sys.argv[1:]):
|
|
log.write(" %d:%s" % (i + 1, arg))
|
|
log.write("\n")
|
|
log.close()
|
|
hgcmd = sys.argv[2]
|
|
if os.name == 'nt':
|
|
# hack to make simple unix single quote quoting work on windows
|
|
hgcmd = hgcmd.replace("'", '"')
|
|
r = os.system(hgcmd)
|
|
sys.exit(bool(r))
|