panda3d/tests/build_samples.py
Mitchell Stokes d613523f14 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.
2018-03-22 18:53:26 -07:00

20 lines
493 B
Python

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()