From 2582333969c6b8eb8ee1874c4a2c71484d19e1c2 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 11 Oct 2019 07:03:29 +0300 Subject: [PATCH] tests: filter_cflags: fix test 2 --- tests/filter_cflags/wscript | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/filter_cflags/wscript b/tests/filter_cflags/wscript index 09ca151..014d356 100644 --- a/tests/filter_cflags/wscript +++ b/tests/filter_cflags/wscript @@ -9,7 +9,7 @@ def configure(conf): conf.load('compiler_c compiler_cxx') c_only_flags = [ - '-DSOME_DEFINITION', # let's guess this flag always exist + '-Wall', # let's guess this flag always exist '-Wsomething-that-does-not-exist' ] @@ -17,7 +17,12 @@ def configure(conf): '-std=c++11', # let's guess this flag always exist only for C++ compiler ] - if '-Wsomething-that-does-not-exist' in conf.filter_cflags(c_only_flags): + filtered_cflags = conf.filter_cflags(c_only_flags) + + if '-Wall' not in filtered_cflags: + conf.fatal('TEST FAILED') + + if '-Wsomething-that-does-not-exist' in filtered_cflags: conf.fatal('TEST FAILED') if '-std=c++11' in conf.filter_cflags(cxx_only_flags):