1
0
mirror of https://github.com/facebook/zstd.git synced 2025-11-25 23:43:06 +03:00

Merge pull request #3120 from eli-schwartz/meson-fixup

Meson test fixups
This commit is contained in:
Yonatan Komornik
2022-12-16 18:28:54 -08:00
committed by GitHub
2 changed files with 82 additions and 14 deletions

View File

@@ -178,6 +178,51 @@ jobs:
make clean make clean
CC=clang MOREFLAGS="-Werror -Wimplicit-fallthrough -O0" make -C lib -j libzstd.a ZSTD_LEGACY_SUPPORT=0 CC=clang MOREFLAGS="-Werror -Wimplicit-fallthrough -O0" make -C lib -j libzstd.a ZSTD_LEGACY_SUPPORT=0
meson-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install packages
run: |
sudo apt-get update
sudo apt-get -y install build-essential python3-pip ninja-build liblz4-dev
pip install --pre meson
- name: Build with Meson
run: |
meson setup \
--buildtype=debugoptimized \
-Db_lundef=false \
-Dauto_features=enabled \
-Dbin_programs=true \
-Dbin_tests=true \
-Dbin_contrib=true \
-Ddefault_library=both \
build/meson builddir
ninja -C builddir/
meson test -C builddir/ --print-errorlogs
meson install -C builddir --destdir staging/
meson-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install packages
run: pip install --pre meson
- name: Initialize the MSVC dev command prompt
uses: ilammy/msvc-dev-cmd@674ff850cbd739c402260838fa45b7114f750570
- name: Configure with Meson
run: |
meson setup build/meson/ builddir/ -Dbin_tests=true
- name: Build with Meson
run: |
ninja -C builddir/
- name: Test with Meson
run: |
meson test -C builddir/ --print-errorlogs
- name: Install with Meson
run: |
meson install -C builddir --destdir staging/
cmake-visual-2019: cmake-visual-2019:
runs-on: windows-2019 runs-on: windows-2019
strategy: strategy:

View File

@@ -21,7 +21,6 @@ FUZZER_FLAGS = ['--no-big-tests']
FUZZERTEST = '-T200s' FUZZERTEST = '-T200s'
ZSTREAM_TESTTIME = '-T90s' ZSTREAM_TESTTIME = '-T90s'
DECODECORPUS_TESTTIME = '-T30' DECODECORPUS_TESTTIME = '-T30'
ZSTDRTTEST = ['--test-large-data']
# ============================================================================= # =============================================================================
# Executables # Executables
@@ -134,24 +133,38 @@ checkTag = executable('checkTag',
# ============================================================================= # =============================================================================
if tests_supported_oses.contains(host_machine_os) if tests_supported_oses.contains(host_machine_os)
valgrind_prog = find_program('valgrind', ['/usr/bin/valgrind'], required: true) valgrind_prog = find_program('valgrind', ['/usr/bin/valgrind'], required: false)
valgrindTest_py = files('valgrindTest.py') valgrindTest_py = files('valgrindTest.py')
test('valgrindTest', if valgrind_prog.found()
valgrindTest_py, test('valgrindTest',
args: [valgrind_prog.path(), zstd, datagen, fuzzer, fullbench], valgrindTest_py,
depends: [zstd, datagen, fuzzer, fullbench], args: [valgrind_prog.path(), zstd, datagen, fuzzer, fullbench],
timeout: 600) # Timeout should work on HDD drive depends: [zstd, datagen, fuzzer, fullbench],
timeout: 600) # Timeout should work on HDD drive
endif
endif endif
if host_machine_os != os_windows if host_machine_os != os_windows
playTests_sh = find_program(join_paths(zstd_rootdir, 'tests/playTests.sh'), required: true) playTests_sh = find_program(join_paths(zstd_rootdir, 'tests/playTests.sh'), required: true)
test('test-zstd',
playTests_sh, # add slow tests only if the meson version is new enough to support
args: ZSTDRTTEST, # test setups with default-excluded suites
env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'], if meson.version().version_compare('>=0.57.0')
depends: [datagen], matrix = {'fast': [], 'slow': ['--test-large-data']}
workdir: meson.current_build_dir(), else
timeout: 2800) # Timeout should work on HDD drive 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 endif
test('test-fullbench-1', test('test-fullbench-1',
@@ -179,6 +192,8 @@ test('test-zstream-1',
test('test-zstream-3', test('test-zstream-3',
zstreamtest, zstreamtest,
args: ['--newapi', '-t1', ZSTREAM_TESTTIME] + FUZZER_FLAGS, args: ['--newapi', '-t1', ZSTREAM_TESTTIME] + FUZZER_FLAGS,
# --newapi dies on Windows with "exit status 3221225477 or signal 3221225349 SIGinvalid"
should_fail: host_machine_os == os_windows,
timeout: 120) timeout: 120)
test('test-longmatch', longmatch, timeout: 36) test('test-longmatch', longmatch, timeout: 36)
test('test-invalidDictionaries', invalidDictionaries) # should be fast test('test-invalidDictionaries', invalidDictionaries) # should be fast
@@ -190,3 +205,11 @@ test('test-decodecorpus',
args: ['-t', DECODECORPUS_TESTTIME], args: ['-t', DECODECORPUS_TESTTIME],
timeout: 60) timeout: 60)
test('test-poolTests', poolTests) # should be fast 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