aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-02-12 19:03:25 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2018-02-21 17:10:04 +0000
commitb5edf78204059f9b961191e5b5daef6f7fe88e07 (patch)
tree5793603c5b122f1379dd55f3e60fc8ea4a00dd5d
parent68a5b8d9fc34a68bd9f7b8cdb9eb699807fcb2ba (diff)
downloadmeson-b5edf78204059f9b961191e5b5daef6f7fe88e07.zip
meson-b5edf78204059f9b961191e5b5daef6f7fe88e07.tar.gz
meson-b5edf78204059f9b961191e5b5daef6f7fe88e07.tar.bz2
Skip test cases/frameworks/8 flex if flex or bison not found
-rw-r--r--test cases/frameworks/8 flex/meson.build13
1 files changed, 10 insertions, 3 deletions
diff --git a/test cases/frameworks/8 flex/meson.build b/test cases/frameworks/8 flex/meson.build
index 13ac9f6..cb5efde 100644
--- a/test cases/frameworks/8 flex/meson.build
+++ b/test cases/frameworks/8 flex/meson.build
@@ -4,8 +4,16 @@ project('flex and bison', 'c')
# may output headers that are necessary to build
# the sources of a different generator.
-flex = find_program('flex')
-bison = find_program('bison')
+flex = find_program('flex', required: false)
+bison = find_program('bison', required: false)
+
+if not flex.found()
+ error('MESON_SKIP_TEST flex not found.')
+endif
+
+if not bison.found()
+ error('MESON_SKIP_TEST bison not found.')
+endif
lgen = generator(flex,
output : '@PLAINNAME@.yy.c',
@@ -23,4 +31,3 @@ e = executable('pgen', 'prog.c',
lfiles, pfiles)
test('parsertest', e)
-