aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-04-05 16:39:22 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-04-05 16:39:22 -0700
commitf8c938e92410c02aebf8306541fd876bec86d568 (patch)
treeb68bc8b6a5b9b3d9fc31702a9fe2590fb73c5c4c /tests/runner.py
parent85532b83fdc18160cb727e5d4415a283f4c73100 (diff)
add final glbook test
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')