diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-06 10:33:23 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-06 10:33:23 -0800 |
commit | 56a5243117d6df9103cac4ba5ca9a7091321e322 (patch) | |
tree | b552f8d623253d1d081ace9e86e83a21aefd46c7 /tests/runner.py | |
parent | 8c47706854596aab58e6a0125e8d6954dbafcd49 (diff) | |
parent | 88c6cb7612c472f2efc3a94c44e05c6115232e67 (diff) |
Merge pull request #219 from ehsan/mandatory_typed_arrays_2
Disable WebGL if typed arrays are not being used.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tests/runner.py b/tests/runner.py index 044e5cf2..23937974 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -5648,16 +5648,8 @@ f.close() class TestServerHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(s): assert s.path == expectedResult, 'Expected %s, got %s' % (expectedResult, s.path) - httpd.shutdown() - def handle_timeout(): - assert False, 'Timed out while waiting for the browser test to finish' - httpd.shutdown() httpd = BaseHTTPServer.HTTPServer(('localhost', 8888), TestServerHandler) - httpd.timeout = 5; - server_thread = threading.Thread(target=httpd.serve_forever) - server_thread.daemon = True - server_thread.start() - server_thread.join(5.5) + httpd.handle_request() # Finally, do some web browser tests def run_browser(html_file, message, expectedResult = None): @@ -5710,6 +5702,17 @@ f.close() assert os.path.exists('something.html'), output run_browser('something.html', 'You should see animating gears.', '/report_gl_result?true') + # Make sure that OpenGL ES is not available if typed arrays are not used + clear() + output = Popen([EMCC, path_from_root('tests', 'hello_world_gles.c'), '-o', 'something.html', + '-DHAVE_BUILTIN_SINCOS', + '-s', 'USE_TYPED_ARRAYS=0', + '--shell-file', path_from_root('tests', 'hello_world_gles_shell.html')], + stdout=PIPE, stderr=PIPE).communicate() + assert len(output[0]) == 0, output[0] + assert os.path.exists('something.html'), output + run_browser('something.html', 'You should not see animating gears.', '/report_gl_result?false') + def test_eliminator(self): input = open(path_from_root('tools', 'eliminator', 'eliminator-test.js')).read() expected = open(path_from_root('tools', 'eliminator', 'eliminator-test-output.js')).read() |