diff options
author | Alon Zakai <azakai@google.com> | 2023-11-14 13:42:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 13:42:52 -0800 |
commit | 77facb13f716742eb008eb73325efc0410d286d2 (patch) | |
tree | 0ecec71e1dfa4d813cde641debf2a961d1502e0a /scripts/test | |
parent | 1c3a5be545299f289f17edada8620941376a3e00 (diff) | |
download | binaryen-77facb13f716742eb008eb73325efc0410d286d2.tar.gz binaryen-77facb13f716742eb008eb73325efc0410d286d2.tar.bz2 binaryen-77facb13f716742eb008eb73325efc0410d286d2.zip |
Remove various testing spam (#6109)
Avoid some common warnings and stop printing various stdout/stderr stuff.
Helps #6104
Diffstat (limited to 'scripts/test')
-rw-r--r-- | scripts/test/shared.py | 2 | ||||
-rw-r--r-- | scripts/test/wasm2js.py | 3 | ||||
-rw-r--r-- | scripts/test/wasm_opt.py | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py index 28c85e792..441545db3 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -481,7 +481,7 @@ def binary_format_check(wast, verify_final_result=True, wasm_as_args=['-g'], assert os.path.exists('ab.wast') # make sure it is a valid wast - cmd = WASM_OPT + ['ab.wast', '-all'] + cmd = WASM_OPT + ['ab.wast', '-all', '-q'] print(' ', ' '.join(cmd)) subprocess.check_call(cmd, stdout=subprocess.PIPE) diff --git a/scripts/test/wasm2js.py b/scripts/test/wasm2js.py index 7fdd8eb94..ea299e4ed 100644 --- a/scripts/test/wasm2js.py +++ b/scripts/test/wasm2js.py @@ -13,6 +13,7 @@ # limitations under the License. import os +import subprocess from . import shared from . import support @@ -90,7 +91,7 @@ def test_wasm2js_output(): cmd += ['--allow-asserts'] js = support.run_command(cmd) # also verify it passes pass-debug verifications - shared.with_pass_debug(lambda: support.run_command(cmd)) + shared.with_pass_debug(lambda: support.run_command(cmd, stderr=subprocess.PIPE)) open('a.2asm.asserts.mjs', 'w').write(js) diff --git a/scripts/test/wasm_opt.py b/scripts/test/wasm_opt.py index 189a9978c..bc4706906 100644 --- a/scripts/test/wasm_opt.py +++ b/scripts/test/wasm_opt.py @@ -27,7 +27,7 @@ def test_wasm_opt(): wast = os.path.join(shared.options.binaryen_test, 'hello_world.wat') shared.delete_from_orbit('a.wat') out = 'a.wat' - cmd = shared.WASM_OPT + [wast, '-o', out, '-S'] + extra_args + cmd = shared.WASM_OPT + [wast, '-o', out, '-S', '-q'] + extra_args support.run_command(cmd) shared.fail_if_not_identical_to_file(open(out).read(), wast) @@ -36,9 +36,9 @@ def test_wasm_opt(): shutil.copyfile(os.path.join(shared.options.binaryen_test, 'hello_world.wat'), 'a.wat') shared.delete_from_orbit('a.wasm') shared.delete_from_orbit('b.wast') - support.run_command(shared.WASM_OPT + ['a.wat', '-o', 'a.wasm']) + support.run_command(shared.WASM_OPT + ['a.wat', '-o', 'a.wasm', '-q']) assert open('a.wasm', 'rb').read()[0] == 0, 'we emit binary by default' - support.run_command(shared.WASM_OPT + ['a.wasm', '-o', 'b.wast', '-S']) + support.run_command(shared.WASM_OPT + ['a.wasm', '-o', 'b.wast', '-S', '-q']) assert open('b.wast', 'rb').read()[0] != 0, 'we emit text with -S' print('\n[ checking wasm-opt passes... ]\n') @@ -63,7 +63,7 @@ def test_wasm_opt(): for module, asserts in support.split_wast(t): assert len(asserts) == 0 support.write_wast('split.wast', module) - cmd = shared.WASM_OPT + opts + ['split.wast'] + cmd = shared.WASM_OPT + opts + ['split.wast', '-q'] if 'noprint' not in t: cmd.append('--print') curr = support.run_command(cmd) |