diff options
author | Sam Clegg <sbc@chromium.org> | 2017-03-29 18:00:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-29 18:00:45 -0700 |
commit | d3bd2f82b876ab6e54ad9af3b03c2a348fc14b5c (patch) | |
tree | 89b13243282bb93bd2d68a67e42c4f119e877b1c /test/run-tests.py | |
parent | fc721a13ed51969411607dbf6f91822e3097e575 (diff) | |
download | wabt-d3bd2f82b876ab6e54ad9af3b03c2a348fc14b5c.tar.gz wabt-d3bd2f82b876ab6e54ad9af3b03c2a348fc14b5c.tar.bz2 wabt-d3bd2f82b876ab6e54ad9af3b03c2a348fc14b5c.zip |
Cleanup default test tools declartion in run-tests.py (#377)
There was a bunch of redundant splitting and joining
going on.
Diffstat (limited to 'test/run-tests.py')
-rwxr-xr-x | test/run-tests.py | 75 |
1 files changed, 31 insertions, 44 deletions
diff --git a/test/run-tests.py b/test/run-tests.py index 3380fef4..64a90167 100755 --- a/test/run-tests.py +++ b/test/run-tests.py @@ -51,97 +51,82 @@ TOOLS = { }, 'run-wasmdump': { 'EXE': 'test/run-wasmdump.py', - 'FLAGS': ' '.join(['--bindir=%(bindir)s', '--no-error-cmdline']), + 'FLAGS': ['--bindir=%(bindir)s', '--no-error-cmdline'], 'VERBOSE-FLAGS': ['-v'] }, 'run-wasm-link': { 'EXE': 'test/run-wasm-link.py', - 'FLAGS': ' '.join(['--bindir=%(bindir)s',]), + 'FLAGS': ['--bindir=%(bindir)s'], 'VERBOSE-FLAGS': ['-v'] }, 'run-roundtrip': { - 'EXE': - 'test/run-roundtrip.py', - 'FLAGS': - ' '.join([ + 'EXE': 'test/run-roundtrip.py', + 'FLAGS': [ '-v', '--bindir=%(bindir)s', '--no-error-cmdline', '-o', '%(out_dir)s', - ]), - 'VERBOSE-FLAGS': [' '.join(['--print-cmd',]), '-v'] + ], + 'VERBOSE-FLAGS': ['--print-cmd', '-v'] }, 'run-interp': { - 'EXE': - 'test/run-interp.py', - 'FLAGS': - ' '.join([ + 'EXE': 'test/run-interp.py', + 'FLAGS': [ '--bindir=%(bindir)s', '--run-all-exports', '--no-error-cmdline', '-o', '%(out_dir)s', - ]), - 'VERBOSE-FLAGS': [' '.join(['--print-cmd',]), '-v'] + ], + 'VERBOSE-FLAGS': ['--print-cmd', '-v'] }, 'run-interp-spec': { - 'EXE': - 'test/run-interp.py', - 'FLAGS': - ' '.join([ + 'EXE': 'test/run-interp.py', + 'FLAGS': [ '--bindir=%(bindir)s', '--spec', '--no-error-cmdline', '-o', '%(out_dir)s', - ]), - 'VERBOSE-FLAGS': [' '.join(['--print-cmd',]), '-v'] + ], + 'VERBOSE-FLAGS': ['--print-cmd', '-v'] }, 'run-gen-wasm': { - 'EXE': - 'test/run-gen-wasm.py', - 'FLAGS': - ' '.join([ + 'EXE': 'test/run-gen-wasm.py', + 'FLAGS': [ '--bindir=%(bindir)s', '--no-error-cmdline', '-o', '%(out_dir)s', - ]), - 'VERBOSE-FLAGS': [' '.join(['--print-cmd',]), '-v'] + ], + 'VERBOSE-FLAGS': ['--print-cmd', '-v'] }, 'run-gen-wasm-interp': { - 'EXE': - 'test/run-gen-wasm-interp.py', - 'FLAGS': - ' '.join([ + 'EXE': 'test/run-gen-wasm-interp.py', + 'FLAGS': [ '--bindir=%(bindir)s', '--run-all-exports', '--no-error-cmdline', '-o', '%(out_dir)s', - ]), - 'VERBOSE-FLAGS': [' '.join(['--print-cmd',]), '-v'] + ], + 'VERBOSE-FLAGS': ['--print-cmd', '-v'] }, 'run-opcodecnt': { 'EXE': 'test/run-opcodecnt.py', - 'FLAGS': ' '.join([ - '--bindir=%(bindir)s', - '--no-error-cmdline', - ]), - 'VERBOSE-FLAGS': [' '.join(['--print-cmd',]), '-v'] + 'FLAGS': ['--bindir=%(bindir)s', '--no-error-cmdline'], + 'VERBOSE-FLAGS': ['--print-cmd', '-v'] }, 'run-gen-spec-js': { - 'EXE': - 'test/run-gen-spec-js.py', - 'FLAGS': - ' '.join([ + 'EXE': 'test/run-gen-spec-js.py', + 'FLAGS': [ '--bindir=%(bindir)s', '--no-error-cmdline', '-o', '%(out_dir)s', - ]), - 'VERBOSE-FLAGS': [' '.join(['--print-cmd',]), '-v'] + ], + 'VERBOSE-FLAGS': ['--print-cmd', '-v'] }, } @@ -288,7 +273,9 @@ class TestInfo(object): elif key == 'STDIN_FILE': self.input_filename = value elif key == 'FLAGS': - self.flags += shlex.split(value) + if not isinstance(value, list): + value = shlex.split(value) + self.flags += value elif key == 'ERROR': self.expected_error = int(value) elif key == 'SLOW': |