@@ -8055,23 +8055,23 @@ def test_unoptimized_code_size(self):
80558055 # under control to a certain extent. This test allows us to track major
80568056 # changes to the size of the unoptimized and unminified code size.
80578057 # Run with `--rebase` when this test fails.
8058- self.build(test_file('hello_world.c'), emcc_args=['-O0'])
8058+ self.build(test_file('hello_world.c'), emcc_args=['-O0', '--output_eol=linux' ])
80598059 self.check_expected_size_in_file('wasm',
80608060 test_file('other/test_unoptimized_code_size.wasm.size'),
80618061 os.path.getsize('hello_world.wasm'))
80628062 self.check_expected_size_in_file('js',
80638063 test_file('other/test_unoptimized_code_size.js.size'),
80648064 os.path.getsize('hello_world.js'))
80658065
8066- self.build(test_file('hello_world.c'), emcc_args=['-O0', '-sASSERTIONS=0'], output_basename='no_asserts')
8066+ self.build(test_file('hello_world.c'), emcc_args=['-O0','--output_eol=linux', '-sASSERTIONS=0'], output_basename='no_asserts')
80678067 self.check_expected_size_in_file('wasm',
80688068 test_file('other/test_unoptimized_code_size_no_asserts.wasm.size'),
80698069 os.path.getsize('no_asserts.wasm'))
80708070 self.check_expected_size_in_file('js',
80718071 test_file('other/test_unoptimized_code_size_no_asserts.js.size'),
80728072 os.path.getsize('no_asserts.js'))
80738073
8074- self.build(test_file('hello_world.c'), emcc_args=['-O0', '-sSTRICT'], output_basename='strict')
8074+ self.build(test_file('hello_world.c'), emcc_args=['-O0', '--output_eol=linux', '- sSTRICT'], output_basename='strict')
80758075 self.check_expected_size_in_file('wasm',
80768076 test_file('other/test_unoptimized_code_size_strict.wasm.size'),
80778077 os.path.getsize('strict.wasm'))
@@ -8089,7 +8089,7 @@ def run_metadce_test(self, filename, args=[], expected_exists=[], expected_not_e
80898089 expected_basename = test_file('other/metadce', self.id().split('.')[-1])
80908090
80918091 # Run once without closure and parse output to find wasmImports
8092- build_cmd = [compiler_for(filename), filename] + args + self.get_emcc_args()
8092+ build_cmd = [compiler_for(filename), filename, '--output_eol=linux' ] + args + self.get_emcc_args()
80938093 self.run_process(build_cmd + ['-g2'])
80948094 # find the imports we send from JS
80958095 # TODO(sbc): Find a way to do that that doesn't depend on internal details of
@@ -10935,11 +10935,10 @@ def test_main_reads_params(self):
1093510935
1093610936 def test_INCOMING_MODULE_JS_API(self):
1093710937 def test(args):
10938- self.run_process([EMCC, test_file('hello_world.c'), '-O3', '--closure=1', '-sENVIRONMENT=node,shell'] + args)
10938+ self.run_process([EMCC, test_file('hello_world.c'), '-O3', '--closure=1', '-sENVIRONMENT=node,shell', '--output_eol=linux' ] + args)
1093910939 for engine in config.JS_ENGINES:
1094010940 self.assertContained('hello, world!', self.run_js('a.out.js', engine=engine))
10941- # ignore \r which on windows can increase the size
10942- return len(read_file('a.out.js').replace('\r', ''))
10941+ return os.path.getsize('a.out.js')
1094310942 normal = test([])
1094410943 changed = test(['-sINCOMING_MODULE_JS_API=[]'])
1094510944 print('sizes', normal, changed)
0 commit comments