From 3842cfd853930814d27a6cd9df79ba80a69bf500 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 18 Oct 2019 11:31:48 +0100 Subject: [PATCH] Attempt at getting the retcode of the test process --- cibuildwheel/linux.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index ddcec627..7a7de88a 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -57,6 +57,8 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef mkdir /output cd /project + test_retcode=0 + {environment_exports} for PYBIN in {pybin_paths}; do @@ -110,6 +112,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef # Run the tests from a different directory pushd $HOME sh -c {test_command} + test_retcode=$(( $test_retcode || $? )) popd ) @@ -121,6 +124,8 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef mv "$delocated_wheel" /output chown {uid}:{gid} "/output/$(basename "$delocated_wheel")" done + + exit $test_retcode '''.format( pybin_paths=' '.join(c.path+'/bin' for c in platform_configs), test_requires=' '.join(test_requires),