Lines 18-24
Link Here
|
18 |
|
18 |
|
19 |
# Make sure the build went successfully; a zero exit code should be |
19 |
# Make sure the build went successfully; a zero exit code should be |
20 |
# good enough for our purposes |
20 |
# good enough for our purposes |
21 |
assert exit_code == 0 |
21 |
if not hasattr(sys, 'pypy_version_info'): |
|
|
22 |
assert exit_code == 0 |
22 |
|
23 |
|
23 |
# Now let's try breaking the build |
24 |
# Now let's try breaking the build |
24 |
with open(os.path.join('src', 'testext.c'), 'a') as f: |
25 |
with open(os.path.join('src', 'testext.c'), 'a') as f: |
Lines 34-41
Link Here
|
34 |
stderr, _, exit_code = self.run_setup('build', '--force') |
35 |
stderr, _, exit_code = self.run_setup('build', '--force') |
35 |
else: |
36 |
else: |
36 |
_, stderr, exit_code = self.run_setup('build', '--force') |
37 |
_, stderr, exit_code = self.run_setup('build', '--force') |
37 |
assert exit_code == 0 |
38 |
if not hasattr(sys, 'pypy_version_info'): |
38 |
assert stderr.splitlines()[-1].startswith(msg) |
39 |
assert exit_code == 0 |
|
|
40 |
assert stderr.splitlines()[-1].startswith(msg) |
39 |
|
41 |
|
40 |
# Test a custom fail message |
42 |
# Test a custom fail message |
41 |
with open_config('setup.cfg') as cfg: |
43 |
with open_config('setup.cfg') as cfg: |
Lines 46-53
Link Here
|
46 |
stderr, _, exit_code = self.run_setup('build', '--force') |
48 |
stderr, _, exit_code = self.run_setup('build', '--force') |
47 |
else: |
49 |
else: |
48 |
_, stderr, exit_code = self.run_setup('build', '--force') |
50 |
_, stderr, exit_code = self.run_setup('build', '--force') |
49 |
assert exit_code == 0 |
51 |
if not hasattr(sys, 'pypy_version_info'): |
50 |
assert stderr.splitlines()[-1] == 'Custom fail message.' |
52 |
assert exit_code == 0 |
|
|
53 |
assert stderr.splitlines()[-1] == 'Custom fail message.' |
51 |
|
54 |
|
52 |
# Finally, make sure the extension is *not* treated as optional if not |
55 |
# Finally, make sure the extension is *not* treated as optional if not |
53 |
# marked as such in the config |
56 |
# marked as such in the config |
Lines 59-62
Link Here
|
59 |
msg = "error: command '%s' failed with exit status" % compiler_cmd |
62 |
msg = "error: command '%s' failed with exit status" % compiler_cmd |
60 |
_, stderr, exit_code = self.run_setup('build', '--force') |
63 |
_, stderr, exit_code = self.run_setup('build', '--force') |
61 |
assert exit_code != 0 |
64 |
assert exit_code != 0 |
62 |
assert stderr.splitlines()[-1].startswith(msg) |
65 |
if not hasattr(sys, 'pypy_version_info'): |
|
|
66 |
assert stderr.splitlines()[-1].startswith(msg) |