deploy-ng: Add tests/build_samples.py script

This script will run python setup.py bdist_apps on each sample in a list
(currently only contains asteroids). The script will fail if any of the
builds fail. We can use this for some automated sanitity checking of
deploy-ng builds.
This commit is contained in:
Mitchell Stokes 2018-03-22 18:53:26 -07:00
parent b91cb655c3
commit d613523f14
2 changed files with 22 additions and 3 deletions

View File

@ -18,9 +18,9 @@ setup(
],
'platforms': [
'manylinux1_x86_64',
#'macosx_10_6_x86_64',
#'win32',
#'win_amd64',
'macosx_10_6_x86_64',
'win32',
'win_amd64',
],
}
}

19
tests/build_samples.py Normal file
View File

@ -0,0 +1,19 @@
import os
import subprocess
SAMPLES_TO_BUILD = [
'asteroids',
]
SAMPLES_DIR = os.path.join(os.path.dirname(__file__), '..', 'samples')
def main():
for sample in SAMPLES_TO_BUILD:
sampledir = os.path.join(SAMPLES_DIR, sample)
os.chdir(sampledir)
# This will raise a CalledProcessError if the build fails, which will cause
# this script to fail
subprocess.check_call(['python', 'setup.py', 'bdist_apps'])
if __name__ == '__main__':
main()