aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py18
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)