From 3ff79f6a2f57f6a5fc496f86ee915d71f9eb950c Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Thu, 27 Sep 2018 11:29:09 +0200 Subject: [PATCH 1/3] Add test/test_numpy_suite_numeric.py --- test/test_numpy_suite_numeric.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/test_numpy_suite_numeric.py diff --git a/test/test_numpy_suite_numeric.py b/test/test_numpy_suite_numeric.py new file mode 100644 index 000000000..9752d78ca --- /dev/null +++ b/test/test_numpy_suite_numeric.py @@ -0,0 +1,17 @@ +def test_numpy(selenium_standalone): + selenium = selenium_standalone + selenium.load_package('pytest') + selenium.load_package('numpy') + selenium.load_package('nose') + selenium.run('from pathlib import Path') + selenium.run('import numpy') + selenium.run('import pytest') + selenium.run('base_dir = Path(numpy.__file__).parent') + try: + selenium.run("pytest.main(['--continue-on-collection-errors', '-v'," + " base_dir / 'core/tests/test_numeric.py'])") + except Exception as exc: # noqa + print('Exception', print(exc)) + print('# Logs') + logs = '\n'.join(selenium.logs) + print(logs) From b9ad36fdd7af02b4b94ff7ebeff01d5405a3a9eb Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Thu, 27 Sep 2018 11:38:26 +0200 Subject: [PATCH 2/3] Set "BINARYEN_TRAP_MODE='clamp'" --- .circleci/config.yml | 4 ++++ Makefile | 1 + Makefile.envs | 1 + 3 files changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5687916ab..a56908713 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,6 +64,10 @@ jobs: make ccache -s + - run: + name: check-size + command: ls -lh build/ + - save_cache: paths: - ./emsdk/emsdk diff --git a/Makefile b/Makefile index 91839a04b..27e2b9698 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,7 @@ LDFLAGS=\ -std=c++14 \ -lstdc++ \ --memory-init-file 0 \ + -s "BINARYEN_TRAP_MODE='clamp'" \ -s TEXTDECODER=0 \ -s LZ4=1 diff --git a/Makefile.envs b/Makefile.envs index 0e93fe0fc..dcc1704f7 100644 --- a/Makefile.envs +++ b/Makefile.envs @@ -21,4 +21,5 @@ export SIDE_LDFLAGS=\ -s EMULATE_FUNCTION_POINTER_CASTS=1 \ -s SIDE_MODULE=1 \ -s WASM=1 \ + -s "BINARYEN_TRAP_MODE='clamp'" \ --memory-init-file 0 From a34d18c0c486eeccd991b921cb54a84b404d5bac Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Thu, 27 Sep 2018 15:15:15 +0200 Subject: [PATCH 3/3] Revert "Add test/test_numpy_suite_numeric.py" This reverts commit 3ff79f6a2f57f6a5fc496f86ee915d71f9eb950c. --- test/test_numpy_suite_numeric.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 test/test_numpy_suite_numeric.py diff --git a/test/test_numpy_suite_numeric.py b/test/test_numpy_suite_numeric.py deleted file mode 100644 index 9752d78ca..000000000 --- a/test/test_numpy_suite_numeric.py +++ /dev/null @@ -1,17 +0,0 @@ -def test_numpy(selenium_standalone): - selenium = selenium_standalone - selenium.load_package('pytest') - selenium.load_package('numpy') - selenium.load_package('nose') - selenium.run('from pathlib import Path') - selenium.run('import numpy') - selenium.run('import pytest') - selenium.run('base_dir = Path(numpy.__file__).parent') - try: - selenium.run("pytest.main(['--continue-on-collection-errors', '-v'," - " base_dir / 'core/tests/test_numeric.py'])") - except Exception as exc: # noqa - print('Exception', print(exc)) - print('# Logs') - logs = '\n'.join(selenium.logs) - print(logs)