X Tutup
Skip to content

Commit 232b5fe

Browse files
committed
Make sure we pass return code back.
1 parent 4019b4a commit 232b5fe

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

test/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,26 @@ PHONY=check clean dist distclean test test-unit test-functional rmChangeLog clea
33
GIT2CL ?= git2cl
44
PYTHON ?= python
55

6-
# Set COMILE='--compile' to force compilation before check
6+
# Set COMPILE='--compile' to force compilation before check
77
COMPILE ?=
88

99
#: Run all tests
1010
check: check-short check-2.7-ok
1111

12+
## FIXME: there is a bug in our code that I don't
13+
## find in uncompyle2 that causes this to fail.
14+
## parsing.
15+
## the failing program works if run by itself.
16+
## This leads me to believe the problem is an
17+
## initialization bug?
18+
19+
#: Check deparsing only, but from a different Python version
20+
check-bytecode:
21+
$(PYTHON) test_pythonlib.py --bytecode-2.5
22+
1223
#: Run quick tests
1324
check-short:
1425
$(PYTHON) test_pythonlib.py --base-2.7 --verify $(COMPILE)
15-
$(PYTHON) test_pythonlib.py --bytecode-2.5
1626

1727
#: Run longer Python 2.7's lib files known to be okay
1828
check-2.7-ok:

test/test_pythonlib.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,14 @@ def file_matches(files, root, basenames, patterns):
148148
print('Source directory: ', src_dir)
149149
print('Output directory: ', target_dir)
150150
try:
151-
main(src_dir, target_dir, files, [], do_verify=opts['do_verify'])
151+
_, _, failed_files, failed_verify = \
152+
main(src_dir, target_dir, files, [],
153+
do_verify=opts['do_verify'])
154+
if failed_files != 0:
155+
exit(2)
156+
elif failed_verify != 0:
157+
exit(3)
158+
152159
except (KeyboardInterrupt, OSError):
153160
print()
154161
exit(1)

0 commit comments

Comments
 (0)
X Tutup