diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-11-18 11:27:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 11:27:43 -0800 |
commit | 1e527ec6c1553a47bceb60b6c70011552019b7e6 (patch) | |
tree | a9ac5eef151f3b05c1fe8ab57d443f53956df535 /scripts/test | |
parent | 3b5a67596be228d44471ecf66c934162c7b87882 (diff) | |
download | binaryen-1e527ec6c1553a47bceb60b6c70011552019b7e6.tar.gz binaryen-1e527ec6c1553a47bceb60b6c70011552019b7e6.tar.bz2 binaryen-1e527ec6c1553a47bceb60b6c70011552019b7e6.zip |
Introduce lit/FileCheck tests (#3367)
lit and FileCheck are the tools used to run the majority of tests in LLVM. Each
lit test file contains the commands to be run for that test, so lit tests are
much more flexible and can be more precise than our current ad hoc testing
system. FileCheck reads expected test output from comments, so it allows test
output to be written alongside and interspersed with test input, making tests
more readable and precise than in our current system.
This PR adds a new suite to check.py that runs lit tests in the test/lit
directory. A few tests have been ported to demonstrate the features of the new
test runner.
This change is motivated by a need for greater flexibility in testing wasm-split.
See #3359.
Diffstat (limited to 'scripts/test')
-rw-r--r-- | scripts/test/lld.py | 2 | ||||
-rw-r--r-- | scripts/test/shared.py | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/scripts/test/lld.py b/scripts/test/lld.py index 5732f7332..328339287 100644 --- a/scripts/test/lld.py +++ b/scripts/test/lld.py @@ -26,8 +26,6 @@ def args_for_finalize(filename): ret += ['--side-module'] if 'standalone-wasm' in filename: ret += ['--standalone-wasm'] - if 'bigint' in filename: - ret += ['--bigint'] return ret diff --git a/scripts/test/shared.py b/scripts/test/shared.py index 720ad2aa9..dcb52b3fe 100644 --- a/scripts/test/shared.py +++ b/scripts/test/shared.py @@ -50,8 +50,9 @@ def parse_args(args): ' earlier errors.')) parser.add_argument( '--binaryen-bin', dest='binaryen_bin', default='', - help=('Specifies a path to where the built Binaryen executables reside at.' - ' Default: bin/ of current directory (i.e. assume an in-tree build).' + help=('Specifies the path to the Binaryen executables in the CMake build' + ' directory. Default: bin/ of current directory (i.e. assume an' + ' in-tree build).' ' If not specified, the environment variable BINARYEN_ROOT= can also' ' be used to adjust this.')) parser.add_argument( @@ -129,6 +130,8 @@ if not options.binaryen_lib: options.binaryen_lib = os.path.normpath(os.path.abspath(options.binaryen_lib)) +options.binaryen_build = os.path.dirname(options.binaryen_bin) + # ensure BINARYEN_ROOT is set up os.environ['BINARYEN_ROOT'] = os.path.dirname(options.binaryen_bin) |