aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJez Ng <me@jezng.com>2013-06-21 06:19:25 -0700
committerJez Ng <me@jezng.com>2013-06-22 01:23:22 -0700
commitd50e7b4f7de07df53f820051dac85e79f8aa6e84 (patch)
treed771d772ed9c9994dd3f9412e3840ee491752e43
parent4eef4beff61d4efae4e372e7f4ee66090f9bcef5 (diff)
Improvements to test_html_source_map.
* Now works on FF Nightly * Test does not run unless explicitly requested
-rwxr-xr-xtests/runner.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 10478b6a..f13db825 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -11766,6 +11766,8 @@ elif 'browser' in str(sys.argv):
message='You should see "hello, world!" and a colored cube.')
def test_html_source_map(self):
+ if 'test_html_source_map' not in str(sys.argv): return self.skip('''This test
+ requires manual intervention; will not be run unless explicitly requested''')
cpp_file = os.path.join(self.get_dir(), 'src.cpp')
html_file = os.path.join(self.get_dir(), 'src.html')
# browsers will try to 'guess' the corresponding original line if a
@@ -11788,7 +11790,10 @@ elif 'browser' in str(sys.argv):
return 0;
}
''')
- Popen([PYTHON, EMCC, cpp_file, '-o', html_file, '--map']).communicate()
+ # use relative paths when calling emcc, because file:// URIs can only load
+ # sourceContent when the maps are relative paths
+ Popen([PYTHON, EMCC, 'src.cpp', '-o', 'src.html', '--map'],
+ cwd=self.get_dir()).communicate()
webbrowser.open_new('file://' + html_file)
print '''
Set the debugger to pause on exceptions