aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 1c822ac9..21be107c 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6639,8 +6639,8 @@ elif 'browser' in str(sys.argv):
}
img.src = '%s';
};
- Module.postRun = doReftest;
- Module.preRun = function() {
+ Module['postRun'] = doReftest;
+ Module['preRun'] = function() {
setTimeout(doReftest, 0); // if run() throws an exception and postRun is not called, this will kick in
};
''' % basename)
@@ -6928,6 +6928,7 @@ elif 'browser' in str(sys.argv):
os.path.join('Chapter_9', 'Simple_TextureCubemap', 'CH09_TextureCubemap.bc'),
os.path.join('Chapter_9', 'TextureWrap', 'CH09_TextureWrap.bc'),
os.path.join('Chapter_10', 'MultiTexture', 'CH10_MultiTexture.bc'),
+ os.path.join('Chapter_13', 'ParticleSystem', 'CH13_ParticleSystem.bc'),
], configure=None)
for program in programs:
print program
@@ -6937,6 +6938,10 @@ elif 'browser' in str(sys.argv):
shutil.copyfile(path_from_root('tests', 'glbook', 'Chapter_10', 'MultiTexture', 'basemap.tga'), os.path.join(self.get_dir(), 'basemap.tga'))
shutil.copyfile(path_from_root('tests', 'glbook', 'Chapter_10', 'MultiTexture', 'lightmap.tga'), os.path.join(self.get_dir(), 'lightmap.tga'))
args = ['--preload-file', 'basemap.tga', '--preload-file', 'lightmap.tga']
+ elif basename == 'CH13_ParticleSystem.bc':
+ shutil.copyfile(path_from_root('tests', 'glbook', 'Chapter_13', 'ParticleSystem', 'smoke.tga'), os.path.join(self.get_dir(), 'smoke.tga'))
+ args = ['--preload-file', 'smoke.tga', '-O2'] # test optimizations and closure here as well for more coverage
+
self.reftest(path_from_root('tests', 'glbook', basename.replace('.bc', '.png')))
Popen(['python', EMCC, program, '-o', 'program.html', '--pre-js', 'reftest.js'] + args).communicate()
self.run_browser('program.html', '', '/report_result?0')