diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-03-07 01:49:30 +0530 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-03-11 07:11:59 -0400 |
commit | 69e9d32bca23d75a9a5d7df794d34c9aeb949d8a (patch) | |
tree | e69287358bd3dc77a4214c46176a83046908bbd3 /run_unittests.py | |
parent | bd953b6b2977eb9d9afb92208f117dd8845a3088 (diff) | |
download | meson-69e9d32bca23d75a9a5d7df794d34c9aeb949d8a.zip meson-69e9d32bca23d75a9a5d7df794d34c9aeb949d8a.tar.gz meson-69e9d32bca23d75a9a5d7df794d34c9aeb949d8a.tar.bz2 |
coredata: Warn on usage of both -Dbuildtype and -Doptimization/-Ddebug
It may not be obvious to users that these two ways to set build-types
override each other and specifying both is redundant, and conflicts
are resolved based on whichever is specified later.
Closes https://github.com/mesonbuild/meson/issues/6742
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/run_unittests.py b/run_unittests.py index 41e8ad4..f867f1c 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3842,10 +3842,11 @@ recommended as it is not supported on some platforms''') self.assertEqual(opts['debug'], True) self.assertEqual(opts['optimization'], '2') self.assertEqual(opts['buildtype'], 'debugoptimized') - # Setting both buildtype and debug on the command-line should work - # Also test that --debug is parsed as -Ddebug=true + # Setting both buildtype and debug on the command-line should work, and + # should warn not to do that. Also test that --debug is parsed as -Ddebug=true self.new_builddir() - self.init(testdir, extra_args=['-Dbuildtype=debugoptimized', '--debug']) + out = self.init(testdir, extra_args=['-Dbuildtype=debugoptimized', '--debug']) + self.assertRegex(out, 'Recommend using either.*buildtype.*debug.*redundant') opts = self.get_opts_as_dict() self.assertEqual(opts['debug'], True) self.assertEqual(opts['optimization'], '2') |