From 1e527ec6c1553a47bceb60b6c70011552019b7e6 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Wed, 18 Nov 2020 11:27:43 -0800 Subject: 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. --- scripts/test/lld.py | 2 -- scripts/test/shared.py | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'scripts/test') 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) -- cgit v1.2.3