Skip to content

Commit a02663f

Browse files
authored
Remove unused test files. NFC (#16013)
tests/atomicrmw_i64.ll: Usage was removed in #13244 tests/encapsulated_asmjs_page_load.html: Usage was removed in #11869 tests/core/test_ptrtoint.out: Usage removed in #6850 tests/core/test_lower_intrinsics.out: Usage removed in #12807 tests/core/test_llvm_intrinsics.out: Usage removed in #12807 tests/qsort/benchmark.cpp: Has never been used.
1 parent d94e837 commit a02663f

7 files changed

+15
-232
lines changed

tests/atomicrmw_i64.ll

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/core/test_llvm_intrinsics.out

Lines changed: 0 additions & 112 deletions
This file was deleted.

tests/core/test_lower_intrinsics.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/core/test_ptrtoint.out

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/encapsulated_asmjs_page_load.html

Lines changed: 0 additions & 45 deletions
This file was deleted.

tests/qsort/benchmark.cpp

Lines changed: 0 additions & 48 deletions
This file was deleted.

tools/maint/check_for_unused_test_files.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
'metadce',
1818
'__pycache__',
1919
])
20+
ignore_files = set([
21+
'legacy_exported_runtime_numbers_assert.out',
22+
])
2023
ignore_root_patterns = ['runner.*', 'test_*.py']
2124
ignore_root_files = set([
2225
'jsrun.py',
@@ -38,12 +41,18 @@ def check_file(dirpath, filename):
3841
relpath = os.path.relpath(normpath, test_dir)
3942
stem, ext = os.path.splitext(normpath)
4043

44+
# Ignore explict exceptions
4145
if dirpath == test_dir:
4246
if filename in ignore_root_files:
4347
return
4448
if any(fnmatch.fnmatch(filename, pattern) for pattern in ignore_root_patterns):
4549
return
4650

51+
# .out files are live if and only if they live alongside a live source file
52+
if ext == '.out' and os.path.exists(stem + '.cpp') or os.path.exists(stem + '.c'):
53+
return
54+
55+
# Files under 'core' can be live if they are find in a `do_core_test` call.
4756
parts = relpath.split(os.path.sep)
4857
if parts[0] == 'core':
4958
pattern = "do_core_test('" + os.path.join(*parts[1:]) + "'"
@@ -53,17 +62,21 @@ def check_file(dirpath, filename):
5362
if grep(pattern, 'test_core.py'):
5463
return
5564

65+
# Files under 'other' can be live if they are find in a `do_other_test` call.
5666
if parts[0] == 'other':
5767
pattern = "do_other_test('" + os.path.join(*parts[1:]) + "'"
5868
if grep(pattern, 'test_other.py'):
5969
return
6070

71+
# Files under 'code_size' are live if the stem can be found quoted in test code.
6172
if parts[0] == 'code_size':
6273
if ext == '.json' and grep("'" + os.path.basename(stem) + "'"):
6374
return
6475

65-
if ext == '.out' and os.path.exists(stem + '.cpp') or os.path.exists(stem + '.c'):
66-
return
76+
# test_asan builds it pathnames programatically based on the basename, so just
77+
# search for the basename.
78+
if filename.startswith('test_asan_'):
79+
relpath = os.path.basename(relpath)
6780

6881
if grep(relpath):
6982
return

0 commit comments

Comments
 (0)