mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
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:
parent
b91cb655c3
commit
d613523f14
@ -18,9 +18,9 @@ setup(
|
|||||||
],
|
],
|
||||||
'platforms': [
|
'platforms': [
|
||||||
'manylinux1_x86_64',
|
'manylinux1_x86_64',
|
||||||
#'macosx_10_6_x86_64',
|
'macosx_10_6_x86_64',
|
||||||
#'win32',
|
'win32',
|
||||||
#'win_amd64',
|
'win_amd64',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
19
tests/build_samples.py
Normal file
19
tests/build_samples.py
Normal 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()
|
Loading…
x
Reference in New Issue
Block a user