tests: filter_cflags: fix test 2

This commit is contained in:
Alibek Omarov 2019-10-11 07:03:29 +03:00
parent 0fdbd2d950
commit 2582333969

View File

@ -9,7 +9,7 @@ def configure(conf):
conf.load('compiler_c compiler_cxx') conf.load('compiler_c compiler_cxx')
c_only_flags = [ 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' '-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 '-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') conf.fatal('TEST FAILED')
if '-std=c++11' in conf.filter_cflags(cxx_only_flags): if '-std=c++11' in conf.filter_cflags(cxx_only_flags):