Merge pull request #3490 from eli-schwartz/meson-tests-noprograms

meson: always build the zstd binary when tests are enabled
This commit is contained in:
Yann Collet
2023-02-16 11:27:27 -08:00
committed by GitHub
3 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -132,7 +132,7 @@ endif
subdir('lib') subdir('lib')
if bin_programs if bin_programs or bin_tests
subdir('programs') subdir('programs')
endif endif
+8 -1
View File
@@ -72,7 +72,14 @@ zstd = executable('zstd',
c_args: zstd_c_args, c_args: zstd_c_args,
dependencies: zstd_deps, dependencies: zstd_deps,
export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0 export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0
install: true) build_by_default: bin_programs,
install: bin_programs)
if not bin_programs
# we generate rules to build the programs, but don't install anything
# so do not continue to installing scripts and manpages
subdir_done()
endif
zstd_frugal_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'), zstd_frugal_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'),
join_paths(zstd_rootdir, 'programs/timefn.c'), join_paths(zstd_rootdir, 'programs/timefn.c'),
+1 -1
View File
@@ -162,7 +162,7 @@ if host_machine_os != os_windows
playTests_sh, playTests_sh,
args: opt, args: opt,
env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'], env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'],
depends: [datagen], depends: [datagen, zstd],
suite: suite, suite: suite,
workdir: meson.current_build_dir(), workdir: meson.current_build_dir(),
timeout: 2800) # Timeout should work on HDD drive timeout: 2800) # Timeout should work on HDD drive