diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-05 17:58:53 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-05 17:58:53 -0700 |
commit | cc324bc9fa6cd9924a84732cceaf79066d1be9c6 (patch) | |
tree | 61c4a216780923de84da93cdbe02c37bed11d1ea /tests | |
parent | e24c088f2dfd3f08be4ea808a188b2f653d8617b (diff) |
check for memory initialization in source code
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 1a483a46..561d8523 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -266,6 +266,13 @@ process(sys.argv[1]) if output_processor is not None: output_processor(open(filename + '.o.js').read()) + if self.emcc_args is not None: + if '--memory-init-file' in self.emcc_args: + memory_init_file = int(self.emcc_args[self.emcc_args.index('--memory-init-file')+1]) + else: + memory_init_file = 1 + assert ('/* memory initializer */' in open(filename + '.o.js').read()) == (not memory_init_file) + def run_generated_code(self, engine, filename, args=[], check_timeout=True, output_nicerizer=None): stdout = os.path.join(self.get_dir(), 'stdout') # use files, as PIPE can get too full and hang us stderr = os.path.join(self.get_dir(), 'stderr') |