diff options
-rw-r--r-- | src/library_gl.js | 4 | ||||
-rwxr-xr-x | tests/runner.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 1fed366e..6f363458 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -1031,14 +1031,14 @@ var LibraryGLUT = { } }, - glutMainLoop__deps: ['$GLUT'], + glutMainLoop__deps: ['$GLUT', 'exit'], glutMainLoop: function() { if (GLUT.reshapeFunc) { FUNCTION_TABLE[GLUT.reshapeFunc](Module['canvas'].width, Module['canvas'].height); } _glutPostRedisplay(); - //throw "Entering GLUT mainloop"; + _exit(0); // GLUT mainloop should never return }, }; diff --git a/tests/runner.py b/tests/runner.py index c1d2dc2b..93c50b20 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6859,7 +6859,7 @@ elif 'browser' in str(sys.argv): def test_glgears(self): self.reftest(path_from_root('tests', 'gears.png')) output = Popen(['python', EMCC, path_from_root('tests', 'hello_world_gles.c'), '-o', 'something.html', - '-DHAVE_BUILTIN_SINCOS', '--pre-js', 'reftest.js'], + '-DHAVE_BUILTIN_SINCOS', '--pre-js', 'reftest.js', '-s', 'CATCH_EXIT_CODE=1'], stdout=PIPE, stderr=PIPE).communicate() assert len(output[0]) == 0, output[0] assert os.path.exists('something.html'), output |