aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-10-26 17:50:21 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-10-26 17:50:21 -0700
commit7e9c5f491e8ce890c2f9929905e1aa016ea28e58 (patch)
tree9ba4a42eb6e2580251f1c0bfd1cddb8a1fb04d6e /tests
parent3a10137718138a24df1ab9f41b0ec61419ac053d (diff)
add EMCC_DEBUG=1 in o2.test_openjpeg for more coverage
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py31
1 files changed, 20 insertions, 11 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 108466e4..ac3141a7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -5870,17 +5870,26 @@ def process(filename):
return output
- self.do_run(open(path_from_root('tests', 'openjpeg', 'codec', 'j2k_to_image.c'), 'r').read(),
- 'Successfully generated', # The real test for valid output is in image_compare
- '-i image.j2k -o image.raw'.split(' '),
- libraries=lib,
- includes=[path_from_root('tests', 'openjpeg', 'libopenjpeg'),
- path_from_root('tests', 'openjpeg', 'codec'),
- path_from_root('tests', 'openjpeg', 'common'),
- os.path.join(self.get_build_dir(), 'openjpeg')],
- force_c=True,
- post_build=post,
- output_nicerizer=image_compare)#, build_ll_hook=self.do_autodebug)
+ try:
+ # some test coverage for EMCC_DEBUG
+ adding_debug = self.emcc_args and '-O2' in self.emcc_args and 'EMCC_DEBUG' not in os.environ
+ if adding_debug:
+ print >> sys.stderr, 'running in EMCC_DEBUG mode for test coverage'
+ os.environ['EMCC_DEBUG'] = '1'
+
+ self.do_run(open(path_from_root('tests', 'openjpeg', 'codec', 'j2k_to_image.c'), 'r').read(),
+ 'Successfully generated', # The real test for valid output is in image_compare
+ '-i image.j2k -o image.raw'.split(' '),
+ libraries=lib,
+ includes=[path_from_root('tests', 'openjpeg', 'libopenjpeg'),
+ path_from_root('tests', 'openjpeg', 'codec'),
+ path_from_root('tests', 'openjpeg', 'common'),
+ os.path.join(self.get_build_dir(), 'openjpeg')],
+ force_c=True,
+ post_build=post,
+ output_nicerizer=image_compare)#, build_ll_hook=self.do_autodebug)
+ finally:
+ if adding_debug: del os.environ['EMCC_DEBUG']
def test_python(self):
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')