aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 10:32:45 -0400
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2012-04-13 10:32:45 -0400
commit74cfb3b59c714d2e0ef91d0ad3fe02bc096faf56 (patch)
tree4e743664d4d139c35b4e656f267cb2a0d4799114 /tests/runner.py
parent55d9a3bc975cb4e9fefb79aeca6d5b9ef5fcea1f (diff)
parentffae4e81b6eec71922b662eea9a75f5693994cb2 (diff)
Merge remote-tracking branch 'upstream/incoming' into glmatrix
Conflicts: src/library_gl.js
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 6db096d9..a479cf9f 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6997,6 +6997,19 @@ elif 'browser' in str(sys.argv):
Popen(['python', EMCC, '-O2', '--minify', '0', os.path.join(self.get_dir(), 'sdl_audio.c'), '--preload-file', 'sound.ogg', '--preload-file', 'sound2.wav', '-o', 'page.html', '-s', 'EXPORTED_FUNCTIONS=["_main", "_play", "_play2"]']).communicate()
self.run_browser('page.html', '', '/report_result?1')
+ def test_sdl_gl_read(self):
+ # SDL, OpenGL, readPixels
+ open(os.path.join(self.get_dir(), 'sdl_gl_read.c'), 'w').write(self.with_report_result(open(path_from_root('tests', 'sdl_gl_read.c')).read()))
+ Popen(['python', EMCC, os.path.join(self.get_dir(), 'sdl_gl_read.c'), '-o', 'something.html']).communicate()
+ self.run_browser('something.html', '.', '/report_result?1')
+
+ def zzztest_sdl_ogl(self):
+ # SDL, OpenGL, textures, immediate mode
+ shutil.copyfile(path_from_root('tests', 'screenshot.png'), os.path.join(self.get_dir(), 'screenshot.png'))
+ self.reftest(path_from_root('tests', 'gears.png'))
+ Popen(['python', EMCC, path_from_root('tests', 'sdl_ogl.c'), '-o', 'something.html', '--pre-js', 'reftest.js', '--preload-file', 'screenshot.png']).communicate()
+ self.run_browser('something.html', 'You should see animating gears.', '/report_result?1779')
+
def test_worker(self):
# Test running in a web worker
output = Popen(['python', EMCC, path_from_root('tests', 'hello_world_worker.cpp'), '-o', 'worker.js'], stdout=PIPE, stderr=PIPE).communicate()