|
41 | 41 | import traceback
|
42 | 42 | from os.path import abspath
|
43 | 43 |
|
| 44 | +from test import fuzzing |
44 | 45 | from test import shared
|
45 | 46 | from test import support
|
46 | 47 |
|
@@ -242,7 +243,7 @@ def randomize_fuzz_settings():
|
242 | 243 | def init_important_initial_contents():
|
243 | 244 | # Fuzz dir contents are always important to us.
|
244 | 245 | fuzz_dir = os.path.join(shared.options.binaryen_root, 'fuzz')
|
245 |
| - fuzz_cases = shared.get_tests(fuzz_dir, test_suffixes, recursive=True) |
| 246 | + fuzz_cases = shared.get_tests(fuzz_dir, shared.test_suffixes, recursive=True) |
246 | 247 | FIXED_IMPORTANT_INITIAL_CONTENTS = fuzz_cases
|
247 | 248 |
|
248 | 249 | # If auto_initial_contents is set we'll also grab all test files that are
|
@@ -306,66 +307,9 @@ def is_git_repo():
|
306 | 307 | IMPORTANT_INITIAL_CONTENTS = [os.path.join(shared.get_test_dir('.'), t) for t in initial_contents]
|
307 | 308 |
|
308 | 309 |
|
309 |
| -INITIAL_CONTENTS_IGNORE = [ |
310 |
| - # Float16 is still experimental. |
311 |
| - 'f16.wast', |
312 |
| - # not all relaxed SIMD instructions are implemented in the interpreter |
313 |
| - 'relaxed-simd.wast', |
314 |
| - # TODO: fuzzer and interpreter support for strings |
315 |
| - 'strings.wast', |
316 |
| - 'simplify-locals-strings.wast', |
317 |
| - 'string-lowering-instructions.wast', |
318 |
| - # TODO: fuzzer and interpreter support for extern conversions |
319 |
| - 'extern-conversions.wast', |
320 |
| - # ignore DWARF because it is incompatible with multivalue atm |
321 |
| - 'zlib.wasm', |
322 |
| - 'cubescript.wasm', |
323 |
| - 'class_with_dwarf_noprint.wasm', |
324 |
| - 'fib2_dwarf.wasm', |
325 |
| - 'fib_nonzero-low-pc_dwarf.wasm', |
326 |
| - 'inlined_to_start_dwarf.wasm', |
327 |
| - 'fannkuch3_manyopts_dwarf.wasm', |
328 |
| - 'fib2_emptylocspan_dwarf.wasm', |
329 |
| - 'fannkuch3_dwarf.wasm', |
330 |
| - 'dwarf-local-order.wasm', |
331 |
| - 'strip-producers.wasm', |
332 |
| - 'multi_unit_abbrev_noprint.wasm', |
333 |
| - 'reverse_dwarf_abbrevs.wasm', |
334 |
| - 'print_g.wasm', |
335 |
| - 'print_g_strip-dwarf.wasm', |
336 |
| - 'fannkuch0_dwarf.wasm', |
337 |
| - 'dwarfdump_roundtrip_dwarfdump.wasm', |
338 |
| - 'dwarfdump.wasm', |
339 |
| - 'fannkuch3_dwarf.wasm', |
340 |
| - 'dwarf-local-order.wasm', |
341 |
| - 'dwarf_unit_with_no_abbrevs_noprint.wasm', |
342 |
| - 'strip-debug.wasm', |
343 |
| - 'multi_line_table_dwarf.wasm', |
344 |
| - 'dwarf_with_exceptions.wasm', |
345 |
| - 'strip-dwarf.wasm', |
346 |
| - 'ignore_missing_func_dwarf.wasm', |
347 |
| - 'print.wasm', |
348 |
| - # TODO fuzzer support for multimemory |
349 |
| - 'multi-memories-atomics64.wast', |
350 |
| - 'multi-memories-basics.wast', |
351 |
| - 'multi-memories-simd.wast', |
352 |
| - 'multi-memories-atomics64.wasm', |
353 |
| - 'multi-memories-basics.wasm', |
354 |
| - 'multi-memories-simd.wasm', |
355 |
| - 'multi-memories_size.wast', |
356 |
| - # TODO: fuzzer support for internalize/externalize |
357 |
| - 'optimize-instructions-gc-extern.wast', |
358 |
| - 'gufa-extern.wast', |
359 |
| - # the fuzzer does not support imported memories |
360 |
| - 'multi-memory-lowering-import.wast', |
361 |
| - 'multi-memory-lowering-import-error.wast', |
362 |
| - # the fuzzer does not support typed continuations |
363 |
| - 'typed_continuations.wast', |
364 |
| - 'typed_continuations_resume.wast', |
365 |
| - 'typed_continuations_contnew.wast', |
366 |
| - 'typed_continuations_contbind.wast', |
367 |
| - 'typed_continuations_suspend.wast', |
368 |
| -] |
| 310 | +all_tests = shared.get_all_tests() |
| 311 | + |
| 312 | +INITIAL_CONTENTS_IGNORE = fuzzing.unfuzzable_tests |
369 | 313 |
|
370 | 314 |
|
371 | 315 | def pick_initial_contents():
|
@@ -1802,18 +1746,6 @@ def can_run_on_wasm(self, wasm):
|
1802 | 1746 | ]
|
1803 | 1747 |
|
1804 | 1748 |
|
1805 |
| -test_suffixes = ['*.wasm', '*.wast', '*.wat'] |
1806 |
| - |
1807 |
| -core_tests = shared.get_tests(shared.get_test_dir('.'), test_suffixes) |
1808 |
| -passes_tests = shared.get_tests(shared.get_test_dir('passes'), test_suffixes) |
1809 |
| -spec_tests = shared.get_tests(shared.get_test_dir('spec'), test_suffixes) |
1810 |
| -wasm2js_tests = shared.get_tests(shared.get_test_dir('wasm2js'), test_suffixes) |
1811 |
| -lld_tests = shared.get_tests(shared.get_test_dir('lld'), test_suffixes) |
1812 |
| -unit_tests = shared.get_tests(shared.get_test_dir(os.path.join('unit', 'input')), test_suffixes) |
1813 |
| -lit_tests = shared.get_tests(shared.get_test_dir('lit'), test_suffixes, recursive=True) |
1814 |
| -all_tests = core_tests + passes_tests + spec_tests + wasm2js_tests + lld_tests + unit_tests + lit_tests |
1815 |
| - |
1816 |
| - |
1817 | 1749 | # Do one test, given an input file for -ttf and some optimizations to run
|
1818 | 1750 | def test_one(random_input, given_wasm):
|
1819 | 1751 | randomize_pass_debug()
|
|
0 commit comments