Skip test cases/frameworks/19 pcap if pcap not found

pull/3060/head
Jon Turney 7 years ago
parent a0e98326ca
commit c650bd78ca
  1. 8
      test cases/frameworks/19 pcap/meson.build

@ -1,6 +1,10 @@
project('pcap test', 'c')
pcap_dep = dependency('pcap', version : '>=1.0')
pcap_dep = dependency('pcap', version : '>=1.0', required: false)
if not pcap_dep.found()
error('MESON_SKIP_TEST pcap not found.')
endif
pcap_ver = pcap_dep.version()
assert(pcap_ver.split('.').length() > 1, 'pcap version is "@0@"'.format(pcap_ver))
@ -9,6 +13,6 @@ e = executable('pcap_prog', 'pcap_prog.c', dependencies : pcap_dep)
test('pcaptest', e)
# Ensure discovery bia the configuration tools work also
# Ensure discovery via the configuration tools work also
pcap_dep = dependency('pcap', version : '>=1.0', method : 'pcap-config')
pcap_dep = dependency('pcap', version : '>=1.0', method : 'config-tool')

Loading…
Cancel
Save