mirror of
https://github.com/panda3d/panda3d.git
synced 2025-12-30 11:39:48 -06:00
tests: Support running test suite from adb shell
This commit is contained in:
@@ -5973,7 +5973,7 @@ if PkgSkip("PYTHON") == 0:
|
||||
#
|
||||
# Build the test runner for static builds
|
||||
#
|
||||
if GetLinkAllStatic():
|
||||
if GetLinkAllStatic() or GetTarget() == 'android':
|
||||
if GetTarget() == 'emscripten':
|
||||
LinkFlag('RUN_TESTS_FLAGS', '-s NODERAWFS')
|
||||
LinkFlag('RUN_TESTS_FLAGS', '-s ASSERTIONS=2')
|
||||
@@ -5994,15 +5994,16 @@ if GetLinkAllStatic():
|
||||
OPTS=['DIR:tests', 'PYTHON', 'RUN_TESTS_FLAGS', 'SUBSYSTEM:CONSOLE']
|
||||
PyTargetAdd('run_tests-main.obj', opts=OPTS, input='main.c')
|
||||
PyTargetAdd('run_tests.exe', input='run_tests-main.obj')
|
||||
PyTargetAdd('run_tests.exe', input='core.pyd')
|
||||
if not PkgSkip('DIRECT'):
|
||||
PyTargetAdd('run_tests.exe', input='direct.pyd')
|
||||
if not PkgSkip('PANDAPHYSICS'):
|
||||
PyTargetAdd('run_tests.exe', input='physics.pyd')
|
||||
if not PkgSkip('EGG'):
|
||||
PyTargetAdd('run_tests.exe', input='egg.pyd')
|
||||
if not PkgSkip('BULLET'):
|
||||
PyTargetAdd('run_tests.exe', input='bullet.pyd')
|
||||
if GetLinkAllStatic():
|
||||
PyTargetAdd('run_tests.exe', input='core.pyd')
|
||||
if not PkgSkip('DIRECT'):
|
||||
PyTargetAdd('run_tests.exe', input='direct.pyd')
|
||||
if not PkgSkip('PANDAPHYSICS'):
|
||||
PyTargetAdd('run_tests.exe', input='physics.pyd')
|
||||
if not PkgSkip('EGG'):
|
||||
PyTargetAdd('run_tests.exe', input='egg.pyd')
|
||||
if not PkgSkip('BULLET'):
|
||||
PyTargetAdd('run_tests.exe', input='bullet.pyd')
|
||||
PyTargetAdd('run_tests.exe', input=COMMON_PANDA_LIBS)
|
||||
PyTargetAdd('run_tests.exe', opts=['PYTHON', 'BULLET', 'RUN_TESTS_FLAGS'])
|
||||
|
||||
|
||||
@@ -111,6 +111,11 @@ int main(int argc, char **argv) {
|
||||
PyRun_SimpleString("import sys; sys.argv.insert(1, '--capture=sys')");
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
// No caching on Android
|
||||
PyRun_SimpleString("import sys; sys.argv.insert(1, '-o cache_dir=/dev/null')");
|
||||
#endif
|
||||
|
||||
return Py_RunMain();
|
||||
|
||||
exception:
|
||||
|
||||
Reference in New Issue
Block a user