From: Jean Privat Date: Mon, 23 Jun 2014 19:30:53 +0000 (-0400) Subject: Merge: Nit for mac X-Git-Tag: v0.6.6~20 X-Git-Url: http://nitlanguage.org?hp=-c Merge: Nit for mac Some minor, but needed, tweaks to allow the compilation of Nit on Mac OS X A special page is also created: http://nitlanguage.org/on_mac/ Currenlty, only 31 tests does not pass, most of them are platform or FFI related (some SDK are missing). Pull-Request: #517 Reviewed-by: Lucas Bajolet Reviewed-by: Alexandre Terrasa --- 32cd2c6643ca73972a2d177dc8f1453b147226c8 diff --combined tests/tests.sh index 5672bc1,38efba2..6cfb9be --- a/tests/tests.sh +++ b/tests/tests.sh @@@ -19,6 -19,7 +19,7 @@@ # Set lang do default to avoid failed tests because of locale export LANG=C + export LC_ALL=C export NIT_TESTING=true unset NIT_DIR @@@ -318,11 -319,6 +319,11 @@@ case $engine i niti) enginebinname=nit ;; + emscripten) + enginebinname=nitg + OPT="-m emscripten_nodejs.nit --semi-global $OPT" + savdirs="sav/nitg-sg/" + ;; nitc) echo "disabled engine $engine" exit 0 @@@ -414,11 -410,6 +415,11 @@@ for ii in "$@"; d inputs=/dev/null fi + ffout="$ff.bin" + if [ "$engine" = "emscripten" ]; then + ffout="$ff.bin.js" + fi + if [ "$engine" = "niti" ]; then cat > "./$ff.bin" < "$ff.cmp.err" > "$ff.compile.log" + $TIMEOUT $NITC --no-color $OPT -o "$ffout" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log" ERR=$? if [ "x$verbose" = "xtrue" ]; then cat "$ff.compile.log" cat >&2 "$ff.cmp.err" fi fi + if [ "$engine" = "emscripten" ]; then + echo > "./$ff.bin" "nodejs $ffout \"\$@\"" + chmod +x "$ff.bin" + if grep "Fatal Error: more than one primitive class" "$ff.compile.log" > /dev/null; then + echo " [skip] do no not imports kernel" + echo >>$xml "" + continue + fi + fi if [ "$ERR" != 0 ]; then echo -n "! " cat "$ff.compile.log" "$ff.cmp.err" > "$ff.res"