mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Update to pymake tip to pick up bug 700203.
This commit is contained in:
parent
c6717e54c4
commit
17b2ee39cf
@ -215,9 +215,13 @@ class PythonJob(Job):
|
|||||||
print >>sys.stderr, e
|
print >>sys.stderr, e
|
||||||
return e.exitcode
|
return e.exitcode
|
||||||
except:
|
except:
|
||||||
print >>sys.stderr, sys.exc_info()[1]
|
e = sys.exc_info()[1]
|
||||||
print >>sys.stderr, traceback.print_exc()
|
if isinstance(e, SystemExit) and e.code == '0':
|
||||||
return -127
|
pass # sys.exit(0) is not a failure
|
||||||
|
else:
|
||||||
|
print >>sys.stderr, e
|
||||||
|
print >>sys.stderr, traceback.print_exc()
|
||||||
|
return -127
|
||||||
finally:
|
finally:
|
||||||
os.environ = oldenv
|
os.environ = oldenv
|
||||||
return 0
|
return 0
|
||||||
|
8
build/pymake/tests/native-command-sys-exit.mk
Normal file
8
build/pymake/tests/native-command-sys-exit.mk
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#T gmake skip
|
||||||
|
|
||||||
|
CMD = %pycmd asplode
|
||||||
|
PYCOMMANDPATH = $(TESTPATH) $(TESTPATH)/subdir
|
||||||
|
|
||||||
|
all:
|
||||||
|
$(CMD) 0
|
||||||
|
@echo TEST-PASS
|
@ -1,4 +1,4 @@
|
|||||||
import os
|
import os, sys
|
||||||
|
|
||||||
def writetofile(args):
|
def writetofile(args):
|
||||||
with open(args[0], 'w') as f:
|
with open(args[0], 'w') as f:
|
||||||
@ -7,3 +7,7 @@ def writetofile(args):
|
|||||||
def writeenvtofile(args):
|
def writeenvtofile(args):
|
||||||
with open(args[0], 'w') as f:
|
with open(args[0], 'w') as f:
|
||||||
f.write(os.environ[args[1]])
|
f.write(os.environ[args[1]])
|
||||||
|
|
||||||
|
def asplode(args):
|
||||||
|
sys.exit(args[0])
|
||||||
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user