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
|
||||
return e.exitcode
|
||||
except:
|
||||
print >>sys.stderr, sys.exc_info()[1]
|
||||
print >>sys.stderr, traceback.print_exc()
|
||||
return -127
|
||||
e = sys.exc_info()[1]
|
||||
if isinstance(e, SystemExit) and e.code == '0':
|
||||
pass # sys.exit(0) is not a failure
|
||||
else:
|
||||
print >>sys.stderr, e
|
||||
print >>sys.stderr, traceback.print_exc()
|
||||
return -127
|
||||
finally:
|
||||
os.environ = oldenv
|
||||
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):
|
||||
with open(args[0], 'w') as f:
|
||||
@ -7,3 +7,7 @@ def writetofile(args):
|
||||
def writeenvtofile(args):
|
||||
with open(args[0], 'w') as f:
|
||||
f.write(os.environ[args[1]])
|
||||
|
||||
def asplode(args):
|
||||
sys.exit(args[0])
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user