diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-11-15 13:54:44 +0200 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-11-15 13:54:44 +0200 |
commit | b5bb92c44e86de9a3ee6aa7f4c7f96c1d4a8c314 (patch) | |
tree | 09a1e2be815ec96dfb15eabdc062df6210e4a9ec /tests/runner.py | |
parent | a30bd539fef6ced02bfa83f87b9a8e3f36a7fa97 (diff) |
Move bullet library build code to runner.py so that it can be shared between test_the_bullet in test_core.py and test_static_link test_other.py.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 8c4a9abf..7f513635 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -673,6 +673,24 @@ class BrowserCore(RunnerCore): ################################################################################################### +# Both test_core and test_other access the Bullet library, share the access here to avoid duplication. +def get_bullet_library(runner_core, use_cmake): + if use_cmake: + configure_commands = ['cmake', '.'] + configure_args = ['-DBUILD_DEMOS=OFF', '-DBUILD_EXTRAS=OFF'] + # Depending on whether 'configure' or 'cmake' is used to build, Bullet places output files in different directory structures. + generated_libs = [os.path.join('src', 'BulletDynamics', 'libBulletDynamics.a'), + os.path.join('src', 'BulletCollision', 'libBulletCollision.a'), + os.path.join('src', 'LinearMath', 'libLinearMath.a')] + else: + configure_commands = ['sh', './configure'] + configure_args = ['--disable-demos','--disable-dependency-tracking'] + generated_libs = [os.path.join('src', '.libs', 'libBulletDynamics.a'), + os.path.join('src', '.libs', 'libBulletCollision.a'), + os.path.join('src', '.libs', 'libLinearMath.a')] + + return runner_core.get_library('bullet', generated_libs, configure=configure_commands, configure_args=configure_args, cache_name_extra=configure_commands[0]) + if __name__ == '__main__': # Sanity checks total_engines = len(JS_ENGINES) |