Skip to content

Commit 450602a

Browse files
authored
[debug] Use two digits for the temporary file counter. NFC (#21207)
This means that filenames will sort correctly under normal sorting rules.
1 parent d660cca commit 450602a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/test_other.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2713,7 +2713,7 @@ def test_emcc_debug_files(self):
27132713
self.assertFalse(os.path.exists(self.canonical_temp_dir))
27142714
else:
27152715
print(sorted(os.listdir(self.canonical_temp_dir)))
2716-
self.assertExists(os.path.join(self.canonical_temp_dir, 'emcc-3-original.js'))
2716+
self.assertExists(os.path.join(self.canonical_temp_dir, 'emcc-03-original.js'))
27172717

27182718
def test_debuginfo_line_tables_only(self):
27192719
def test(do_compile):

tools/building.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ def run_wasm_opt(infile, outfile=None, args=[], **kwargs): # noqa
12971297

12981298
def save_intermediate(src, dst):
12991299
if DEBUG:
1300-
dst = 'emcc-%d-%s' % (save_intermediate.counter, dst)
1300+
dst = 'emcc-%02d-%s' % (save_intermediate.counter, dst)
13011301
save_intermediate.counter += 1
13021302
dst = os.path.join(shared.CANONICAL_TEMP_DIR, dst)
13031303
logger.debug('saving debug copy %s' % dst)

0 commit comments

Comments
 (0)