Attempt at getting the retcode of the test process
This commit is contained in:
@@ -57,6 +57,8 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
|||||||
mkdir /output
|
mkdir /output
|
||||||
cd /project
|
cd /project
|
||||||
|
|
||||||
|
test_retcode=0
|
||||||
|
|
||||||
{environment_exports}
|
{environment_exports}
|
||||||
|
|
||||||
for PYBIN in {pybin_paths}; do
|
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
|
# Run the tests from a different directory
|
||||||
pushd $HOME
|
pushd $HOME
|
||||||
sh -c {test_command}
|
sh -c {test_command}
|
||||||
|
test_retcode=$(( $test_retcode || $? ))
|
||||||
popd
|
popd
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -121,6 +124,8 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
|||||||
mv "$delocated_wheel" /output
|
mv "$delocated_wheel" /output
|
||||||
chown {uid}:{gid} "/output/$(basename "$delocated_wheel")"
|
chown {uid}:{gid} "/output/$(basename "$delocated_wheel")"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit $test_retcode
|
||||||
'''.format(
|
'''.format(
|
||||||
pybin_paths=' '.join(c.path+'/bin' for c in platform_configs),
|
pybin_paths=' '.join(c.path+'/bin' for c in platform_configs),
|
||||||
test_requires=' '.join(test_requires),
|
test_requires=' '.join(test_requires),
|
||||||
|
|||||||
Reference in New Issue
Block a user