diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-12 11:20:34 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-12 11:20:34 -0700 |
commit | 619ab111bde0933af49bb9db50aa7f0922ea8b21 (patch) | |
tree | 898a73cd718139321e9214e438e809735510d6bc /tests/runner.py | |
parent | fd8e8492d4902ed44f963f6f49efa14f763aa8dc (diff) | |
parent | 0d2a2e4b97c11ce3bdcfb2928c8da978abc8a1d7 (diff) |
Merge pull request #374 from SiggyBar/build-env-2
Make it easier to use emscripten from a build system.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 38c79751..592f685c 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -7542,6 +7542,24 @@ elif 'sanity' in str(sys.argv): assert mtime(SANITY_FILE) >= mtime(CONFIG_FILE) self.assertNotContained(SANITY_FAIL_MESSAGE, output) + # emcc should be configurable directly from EM_CONFIG without any config file + restore() + config = open(CONFIG_FILE, 'r').read() + os.environ['EM_CONFIG'] = config + wipe() + dirname = tempfile.mkdtemp(prefix='emscripten_test_' + self.__class__.__name__ + '_', dir=TEMP_DIR) + open(os.path.join(dirname, 'main.cpp'), 'w').write(''' + #include <stdio.h> + int main() { + printf("hello from emcc with no config file\\n"); + return 0; + } + ''') + Popen(['python', EMCC, os.path.join(dirname, 'main.cpp'), '-o', os.path.join(dirname, 'a.out.js')]).communicate() + self.assertContained('hello from emcc with no config file', run_js(os.path.join(dirname, 'a.out.js'))) + del os.environ['EM_CONFIG'] + shutil.rmtree(dirname) + def test_emcc_caching(self): INCLUDING_MESSAGE = 'emcc: including X' BUILDING_MESSAGE = 'emcc: building X for cache' |