want_ossfuzz = get_option('oss-fuzz')
want_libfuzzer = get_option('llvm-fuzz')
-want_fuzzbuzz = get_option('fuzzbuzz')
-if want_ossfuzz + want_libfuzzer + want_fuzzbuzz > 1
- error('only one of oss-fuzz, llvm-fuzz or fuzzbuzz can be specified')
+if want_ossfuzz + want_libfuzzer > 1
+ error('only one of oss-fuzz or llvm-fuzz can be specified')
endif
skip_deps = want_ossfuzz or want_libfuzzer
-fuzzer_build = want_ossfuzz or want_libfuzzer or want_fuzzbuzz
+fuzzer_build = want_ossfuzz or want_libfuzzer
#####################################################################
# Try to install the git pre-commit hook
-git_hook = run_command(join_paths(project_source_root, 'tools/add-git-hook.sh'))
-if git_hook.returncode() == 0
- message(git_hook.stdout().strip())
+add_git_hook_sh = find_program('tools/add-git-hook.sh', required : false)
+if add_git_hook_sh.found()
+ git_hook = run_command(add_git_hook_sh)
+ if git_hook.returncode() == 0
+ message(git_hook.stdout().strip())
+ endif
endif
#####################################################################
endif
elif want_ossfuzz
fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine')
-elif want_fuzzbuzz
- fuzzing_engine = meson.get_compiler('cpp').find_library(get_option('fuzzbuzz-engine'), dirs: get_option('fuzzbuzz-engine-dir'))
endif
# Those generate many false positives, and we do not want to change the code to
endif
if conf.get('ENABLE_REPART') == 1
- executable('systemd-repart',
+ exe = executable('systemd-repart',
systemd_repart_sources,
include_directories : includes,
link_with : [libshared],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
+
+ if want_tests != 'false'
+ test('test-repart',
+ test_repart_sh,
+ args : exe.full_path())
+ endif
endif
if conf.get('ENABLE_VCONSOLE') == 1
install_dir : rootbindir)
public_programs += exe
- executable('systemd-network-generator',
+ exe = executable('systemd-network-generator',
network_generator_sources,
include_directories : includes,
link_with : [networkd_link_with],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
+
+ if want_tests != 'false'
+ test('test-network-generator-conversion',
+ test_network_generator_conversion_sh,
+ # https://github.com/mesonbuild/meson/issues/2681
+ args : exe.full_path())
+ endif
endif
executable('systemd-sulogin-shell',
incs = tuple.length() >= 5 ? tuple[4] : includes
link_args = []
- if want_ossfuzz or want_fuzzbuzz
+ if want_ossfuzz
dependencies += fuzzing_engine
elif want_libfuzzer
if fuzzing_engine.found()
sources += 'src/fuzz/fuzz-main.c'
endif
- if want_fuzzbuzz
- sources += 'src/fuzz/fuzzer-entry-point.c'
- endif
-
name = sources[0].split('/')[-1].split('.')[0]
fuzzer_exes += executable(
['debug siphash'],
['valgrind', conf.get('VALGRIND') == 1],
['trace logging', conf.get('LOG_TRACE') == 1],
+ ['install tests', install_tests],
['link-udev-shared', get_option('link-udev-shared')],
['link-systemctl-shared', get_option('link-systemctl-shared')],
['link-networkd-shared', get_option('link-networkd-shared')],