You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Make sure we pass return code back.
This commit is contained in:
@@ -3,16 +3,26 @@ PHONY=check clean dist distclean test test-unit test-functional rmChangeLog clea
|
|||||||
GIT2CL ?= git2cl
|
GIT2CL ?= git2cl
|
||||||
PYTHON ?= python
|
PYTHON ?= python
|
||||||
|
|
||||||
# Set COMILE='--compile' to force compilation before check
|
# Set COMPILE='--compile' to force compilation before check
|
||||||
COMPILE ?=
|
COMPILE ?=
|
||||||
|
|
||||||
#: Run all tests
|
#: Run all tests
|
||||||
check: check-short check-2.7-ok
|
check: check-short check-2.7-ok
|
||||||
|
|
||||||
|
## FIXME: there is a bug in our code that I don't
|
||||||
|
## find in uncompyle2 that causes this to fail.
|
||||||
|
## parsing.
|
||||||
|
## the failing program works if run by itself.
|
||||||
|
## This leads me to believe the problem is an
|
||||||
|
## initialization bug?
|
||||||
|
|
||||||
|
#: Check deparsing only, but from a different Python version
|
||||||
|
check-bytecode:
|
||||||
|
$(PYTHON) test_pythonlib.py --bytecode-2.5
|
||||||
|
|
||||||
#: Run quick tests
|
#: Run quick tests
|
||||||
check-short:
|
check-short:
|
||||||
$(PYTHON) test_pythonlib.py --base-2.7 --verify $(COMPILE)
|
$(PYTHON) test_pythonlib.py --base-2.7 --verify $(COMPILE)
|
||||||
$(PYTHON) test_pythonlib.py --bytecode-2.5
|
|
||||||
|
|
||||||
#: Run longer Python 2.7's lib files known to be okay
|
#: Run longer Python 2.7's lib files known to be okay
|
||||||
check-2.7-ok:
|
check-2.7-ok:
|
||||||
|
@@ -148,7 +148,14 @@ def do_tests(src_dir, obj_patterns, target_dir, opts):
|
|||||||
print('Source directory: ', src_dir)
|
print('Source directory: ', src_dir)
|
||||||
print('Output directory: ', target_dir)
|
print('Output directory: ', target_dir)
|
||||||
try:
|
try:
|
||||||
main(src_dir, target_dir, files, [], do_verify=opts['do_verify'])
|
_, _, failed_files, failed_verify = \
|
||||||
|
main(src_dir, target_dir, files, [],
|
||||||
|
do_verify=opts['do_verify'])
|
||||||
|
if failed_files != 0:
|
||||||
|
exit(2)
|
||||||
|
elif failed_verify != 0:
|
||||||
|
exit(3)
|
||||||
|
|
||||||
except (KeyboardInterrupt, OSError):
|
except (KeyboardInterrupt, OSError):
|
||||||
print()
|
print()
|
||||||
exit(1)
|
exit(1)
|
||||||
|
Reference in New Issue
Block a user