Submitter | Siddharth Agarwal |
---|---|
Date | Dec. 11, 2012, 11:10 p.m. |
Message ID | <a6ee8ebc9872e644b539.1355267451@sid0x220> |
Download | mbox | patch |
Permalink | /patch/66/ |
State | Accepted |
Commit | fe5a4114498250d08d7809c2e144b83686daf101 |
Headers | show |
Comments
On 12 d?c. 2012, at 00:10, Siddharth Agarwal wrote: > # HG changeset patch > # User Siddharth Agarwal <sid0 at fb.com> > # Date 1355267418 28800 > # Node ID a6ee8ebc9872e644b539ae86ec1bed66fddd2880 > # Parent 68acf6ab9cf63c9dd9314a55be7e63b1ae0f3ef1 > run-tests: fix exename on Windows > > diff -r 68acf6ab9cf6 -r a6ee8ebc9872 tests/run-tests.py > --- a/tests/run-tests.py Tue Dec 11 14:46:45 2012 -0800 > +++ b/tests/run-tests.py Tue Dec 11 15:10:18 2012 -0800 > @@ -361,7 +361,7 @@ > if os.path.dirname(path) == exedir: > return > else: > - exename = 'python' > + exename = (sys.platform == 'win32') and 'python.exe' or 'python' We usually use and explicite else clause for this purpose.
Patch
diff -r 68acf6ab9cf6 -r a6ee8ebc9872 tests/run-tests.py --- a/tests/run-tests.py Tue Dec 11 14:46:45 2012 -0800 +++ b/tests/run-tests.py Tue Dec 11 15:10:18 2012 -0800 @@ -361,7 +361,7 @@ if os.path.dirname(path) == exedir: return else: - exename = 'python' + exename = (sys.platform == 'win32') and 'python.exe' or 'python' vlog('# Making python executable in test path use correct Python') mypython = os.path.join(BINDIR, exename) try: