diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-09-18 18:53:28 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-12-20 11:49:30 +0200 |
commit | 26d6ad370e05ff22128df6f0ff17538c8bc1030c (patch) | |
tree | 091a1588a4920a02303719b50bb4a98bb9b67458 /tests/test_browser.py | |
parent | 0025736920d7f388929d606340e744f53a9dc1a4 (diff) |
Add new functions emscripten_log() in emscripten.h which allows printing out log messages with callstack information, and function emscripten_get_callstack(), which allows programmatically obtaining the current callstack.
Diffstat (limited to 'tests/test_browser.py')
-rw-r--r-- | tests/test_browser.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py index dbc09b32..55e368a8 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -119,6 +119,14 @@ If manually bisecting: Even better, add a breakpoint, e.g. on the printf, then reload, then step through and see the print (best to run with EM_SAVE_DIR=1 for the reload). ''' + def test_emscripten_log(self): + src = os.path.join(self.get_dir(), 'src.cpp') + open(src, 'w').write(self.with_report_result(open(path_from_root('tests', 'emscripten_log', 'emscripten_log.cpp')).read())) + shutil.copyfile(path_from_root('tests', 'emscripten_log', 'emscripten-source-map.min.js'), os.path.join(self.get_dir(), 'emscripten-source-map.min.js')) + + Popen([PYTHON, EMCC, src, path_from_root('system', 'lib', 'libcxxabi', 'src', 'cxa_demangle.cpp'), '-I'+path_from_root('system', 'lib', 'libcxxabi', 'include'), '--shell-file', path_from_root('tests', 'emscripten_log', 'shell-emscripten-log.html'), '-g', '-o', 'page.html']).communicate() + self.run_browser('page.html', None, '/report_result?1') + def build_native_lzma(self): lzma_native = path_from_root('third_party', 'lzma.js', 'lzma-native') if os.path.isfile(lzma_native) and os.access(lzma_native, os.X_OK): return |