-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Developer's Guide
This page is for people working on Emscripten itself, as opposed to those that use Emscripten on their own projects. If you are just using Emscripten, you probably don't need to know this stuff (but it might help out sometime too).
Here are some example commands for the test suite, with comments explaining what they do
python tests/runner.py test_hello_world # run hello world test, in default mode
python tests/runner.py asm1.test_hello_world # run it in asm1 mode (see test_core.py end for definition)
python tests/runner.py ALL.test_hello_world # run it in all modes
python tests/runner.py asm1 # run all (core) tests in asm1 mode
python tests/runner.py # run all (core) tests
python tests/runner.py other # run "other" tests - that have no mode
python tests/runner.py other.test_static_link # run a specific test in "other"
python tests/runner.py browser # run browser tests
python tests/runner.py browser.test_sdlglshader # run a specific browser test
python tests/runner.py sockets # run network tests. sockets.test_... works too
python tests/runner.py sanity # run sanity tests. sanity.test_... works too
python tests/runner.py benchmark # run benchmarks. benchmark.test_... works too
To debug a test failure, the following might help:
EMCC_DEBUG=1 ./tests/runner.py test_hello_world
will make emcc emit debug output, and also store its temp files in /tmp/emscripten_temp/
. emcc-* will contain, in order, the files it emits. EMCC_DEBUG=2
will emit even more files. Note that EMCC_DEBUG
works on emcc in general, not just in the test suite.
EM_SAVE_DIR=1
is a test suite specific command that uses /tmp/emscripten_temp/
as the test dir, so that all the files created by the test are retained (note that the dir is not cleaned out beforehand).