aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-17 15:49:59 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-17 15:49:59 -0700
commit9384cd702b4b327ceb7a68302d66b29591047153 (patch)
treefa7c59a6c3a76136fc6bf0f14c1e53bd1989766b
parent4cfcd19e093f4bcab001894303ae22d3c061bdaa (diff)
fix reftesting on proxy tests
-rwxr-xr-xtests/runner.py1
-rw-r--r--tests/test_browser.py6
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 8344f125..b4bafd74 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -689,6 +689,7 @@ class BrowserCore(RunnerCore):
with open(filepath) as f: src = f.read()
with open(temp_filepath, 'w') as f: f.write(self.with_report_result(src))
else:
+ self.reference = reference
expected = [str(i) for i in range(0, reference_slack+1)]
shutil.copyfile(filepath, temp_filepath)
self.reftest(path_from_root('tests', reference))
diff --git a/tests/test_browser.py b/tests/test_browser.py
index a864f395..c1b18da2 100644
--- a/tests/test_browser.py
+++ b/tests/test_browser.py
@@ -719,7 +719,9 @@ If manually bisecting:
self.clear()
self.btest('sdl_canvas.c', expected='1', args=['-s', 'LEGACY_GL_EMULATION=1', '-O2', '-s', 'SAFE_HEAP=1'])
- def post_manual_reftest(self):
+ def post_manual_reftest(self, reference=None):
+ self.reftest(path_from_root('tests', self.reference if reference is None else reference))
+
html = open('test.html').read()
html = html.replace('</body>', '''
<script>
@@ -750,7 +752,7 @@ window.close = function() {
# test .js target with --proxy-worker; emits 2 js files, client and worker
Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_gles_proxy.c'), '-o', 'test.js', '--proxy-to-worker', '-s', 'GL_TESTING=1']).communicate()
open('test.html', 'w').write(open(path_from_root('src', 'shell_minimal.html')).read().replace('{{{ SCRIPT }}}', '<script src="test.js"></script>'))
- self.post_manual_reftest()
+ self.post_manual_reftest('gears.png')
self.run_browser('test.html', None, '/report_result?0')
def test_sdl_canvas_alpha(self):