aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorFlorian Schmaus <flo@geekplace.eu>2021-07-26 00:10:58 +0200
committerGitHub <noreply@github.com>2021-07-26 01:10:58 +0300
commitdbf2ace6ca1ce39aa01497f815b65856079cc581 (patch)
treeb4b9b7cfacc52b3f16f68963d278225c1026cb75 /run_unittests.py
parentbf41d56597349a7047f2034e3e3e00d4502220cc (diff)
downloadmeson-dbf2ace6ca1ce39aa01497f815b65856079cc581.zip
meson-dbf2ace6ca1ce39aa01497f815b65856079cc581.tar.gz
meson-dbf2ace6ca1ce39aa01497f815b65856079cc581.tar.bz2
coredata: throw a MesonException on unknown options
Fixes #7288.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/run_unittests.py b/run_unittests.py
index 324de94..8306782 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3306,8 +3306,6 @@ class AllPlatformTests(BasePlatformTests):
if cc.get_id() == 'clang':
if is_windows():
raise unittest.SkipTest('LTO not (yet) supported by windows clang')
- else:
- extra_args.append('-D_cargs=-Werror=unused-command-line-argument')
self.init(testdir, extra_args=['-Db_lto=true', '-Db_lto_threads=8'] + extra_args)
self.build()
@@ -4315,9 +4313,11 @@ class AllPlatformTests(BasePlatformTests):
self.assertEqual(obj.options[OptionKey('default_library')].value, 'shared')
self.wipe()
- # Should warn on unknown options
- out = self.init(testdir, extra_args=['-Dbad=1', '-Dfoo=2', '-Dwrong_link_args=foo'])
- self.assertIn('Unknown options: "bad, foo, wrong_link_args"', out)
+ # Should fail on unknown options
+ with self.assertRaises((subprocess.CalledProcessError, RuntimeError)) as cm:
+ self.init(testdir, extra_args=['-Dbad=1', '-Dfoo=2', '-Dwrong_link_args=foo'])
+ self.assertNotEqual(0, cm.exception.returncode)
+ self.assertIn(msg, cm.exception.output)
self.wipe()
# Should fail on malformed option