meson: add support for running both fast and slow version of tests
playTests.sh has an option to run really slow tests. This is enabled by default in Meson, but what we really want is to do like the Makefile, and run the fast ones by default, but with an option to run the slow ones instead.
This commit is contained in:
@@ -21,7 +21,6 @@ FUZZER_FLAGS = ['--no-big-tests']
|
||||
FUZZERTEST = '-T200s'
|
||||
ZSTREAM_TESTTIME = '-T90s'
|
||||
DECODECORPUS_TESTTIME = '-T30'
|
||||
ZSTDRTTEST = ['--test-large-data']
|
||||
|
||||
# =============================================================================
|
||||
# Executables
|
||||
@@ -147,13 +146,25 @@ endif
|
||||
|
||||
if host_machine_os != os_windows
|
||||
playTests_sh = find_program(join_paths(zstd_rootdir, 'tests/playTests.sh'), required: true)
|
||||
test('test-zstd',
|
||||
playTests_sh,
|
||||
args: ZSTDRTTEST,
|
||||
env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'],
|
||||
depends: [datagen],
|
||||
workdir: meson.current_build_dir(),
|
||||
timeout: 2800) # Timeout should work on HDD drive
|
||||
|
||||
# add slow tests only if the meson version is new enough to support
|
||||
# test setups with default-excluded suites
|
||||
if meson.version().version_compare('>=0.57.0')
|
||||
matrix = {'fast': [], 'slow': ['--test-large-data']}
|
||||
else
|
||||
matrix = {'fast': []}
|
||||
endif
|
||||
|
||||
foreach suite, opt: matrix
|
||||
test('test-zstd-'+suite,
|
||||
playTests_sh,
|
||||
args: opt,
|
||||
env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'],
|
||||
depends: [datagen],
|
||||
suite: suite,
|
||||
workdir: meson.current_build_dir(),
|
||||
timeout: 2800) # Timeout should work on HDD drive
|
||||
endforeach
|
||||
endif
|
||||
|
||||
test('test-fullbench-1',
|
||||
@@ -192,3 +203,11 @@ test('test-decodecorpus',
|
||||
args: ['-t', DECODECORPUS_TESTTIME],
|
||||
timeout: 60)
|
||||
test('test-poolTests', poolTests) # should be fast
|
||||
|
||||
if meson.version().version_compare('>=0.57.0')
|
||||
add_test_setup('fast',
|
||||
is_default: true,
|
||||
exclude_suites: ['slow'])
|
||||
add_test_setup('slow',
|
||||
exclude_suites: ['fast'])
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user