tests.sh: new engine `emscripten` for `nitg -m emscripten`
authorJean Privat <jean@pryen.org>
Wed, 18 Jun 2014 20:01:21 +0000 (16:01 -0400)
committerJean Privat <jean@pryen.org>
Thu, 19 Jun 2014 01:27:49 +0000 (21:27 -0400)
commit1199947f7fcd7786bc2d0ee7699d715200b3f82e
tree98eec1fd4b6f3b9c801c06378691eab6ed9fc67d
parent046e353607c3e56b40be369e71cf2e017c23b706
tests.sh: new engine `emscripten` for `nitg -m emscripten`

The produced .js files are then executed by nodejs.

All base tests that do not import kernel are skipped because
since the module lib/emscripten.nit imports the kernel module,
an automatic double definition of classes `Object` and `Sys` occurs.

nodejs cannot perform correctly synchronized input, thus `stdin` and all
file reading does not work although they work in a browser.
As a workaround, a special module `emscripten_nodejs.nit` is added that just
print "NOT_YET_IMPLEMENTED" on unsupported services on synchronized input,
thus marking the test as skipped.

Currently, 99 (7% of the 1390 tests) still cause some other kind of failures;
they will be investigated later.

The whole testing of all the tests takes 68m on my machine.
ccache in unusable and the option --jcache of emcc does not bring any boost.
So it is unlikely that `testall.sh` will include this engine.

Signed-off-by: Jean Privat <jean@pryen.org>
tests/emscripten.skip [new file with mode: 0644]
tests/emscripten_nodejs.nit [new file with mode: 0644]
tests/sav/emscripten/emscripten_nodejs.res [new file with mode: 0644]
tests/sav/emscripten/fixme/base_attr_gen_alt1.res [new file with mode: 0644]
tests/sav/emscripten/fixme/base_conflict_submodule_name.res [new file with mode: 0644]
tests/sav/emscripten/fixme/base_conflict_submodule_name_alt1.res [new file with mode: 0644]
tests/sav/emscripten/fixme/base_conflict_submodule_name_alt2.res [new file with mode: 0644]
tests/sav/emscripten_nodejs.res [new file with mode: 0644]
tests/tests.sh