diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-23 18:11:40 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-23 18:11:40 -0700 |
commit | 41ea37201c7b0c2aaec8631a09c7754b36a83d4c (patch) | |
tree | d6b83a485a8bd07ea77526d80dff3c79367922f5 | |
parent | d2ebb6200b9ad0fe4f1376e192382383352f7799 (diff) |
support relative paths in -s KEY=@path
-rwxr-xr-x | emcc | 2 | ||||
-rwxr-xr-x | tests/runner.py | 12 |
2 files changed, 13 insertions, 1 deletions
@@ -994,7 +994,7 @@ try: for change in settings_changes: key, value = change.split('=') if value[0] == '@': - value = '"' + value + '"' + value = '"@' + os.path.abspath(value[1:]) + '"' exec('shared.Settings.' + key + ' = ' + value) # Apply effects from settings diff --git a/tests/runner.py b/tests/runner.py index 1b5666c3..a6b90f8d 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -8605,6 +8605,18 @@ def process(filename): open('dead_funcs', 'w').write(pgo_output[pgo_output.find('['):-1]) self.emcc_args += ['-s', 'DEAD_FUNCTIONS=@' + self.in_dir('dead_funcs')] self.do_run(src, output) + self.emcc_args.pop() + self.emcc_args.pop() + shutil.move(self.in_dir('src.cpp.o.js'), self.in_dir('pgoed2.js')) + assert open('pgoed.js').read() == open('pgoed2.js').read() + + # with relative response in settings element itself + + open('dead_funcs', 'w').write(pgo_output[pgo_output.find('['):-1]) + self.emcc_args += ['-s', 'DEAD_FUNCTIONS=@dead_funcs'] + self.do_run(src, output) + self.emcc_args.pop() + self.emcc_args.pop() shutil.move(self.in_dir('src.cpp.o.js'), self.in_dir('pgoed2.js')) assert open('pgoed.js').read() == open('pgoed2.js').read() |