diff options
-rwxr-xr-x | emcc | 3 | ||||
-rwxr-xr-x | tests/runner.py | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -832,6 +832,9 @@ try: os.stat(Compression.compressed_name(file_['name'])).st_size): file_['net_name'] = Compression.compressed_name(file_['name']) file_['compressed'] = True + else: + if DEBUG: print >> sys.stderr, 'emcc: not compressing %s since not worth it' % file_['name'] + os.remove(Compression.compressed_name(file_['name'])) # Set up folders partial_dirs = [] diff --git a/tests/runner.py b/tests/runner.py index 80baf7fd..5f06d255 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6357,6 +6357,7 @@ f.close() path_from_root('third_party', 'lzma.js', 'lzma-decoder.js'), 'LZMA.decompress')]).communicate() assert ('.compress' in open('page.js').read()) == worth_compressing, 'do not compress image if not worth it' + assert os.path.exists(basename + '.compress') == worth_compressing, 'remove .compress if not compressing' if worth_compressing: shutil.move(os.path.join(self.get_dir(), basename), basename + '.renamedsoitcannotbefound'); self.run_browser('page.html', '', '/report_result?' + str(width)) |