From 5970f1be3c5299851f4e2c7e70e3f8c9975391ab Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 27 Apr 2018 11:03:50 -0400 Subject: [PATCH] Passing --bindir twice is fine Unit test was asserting that "meson --bindir=foo --bindir=bar" must succeed and "meson configure --bindir=foo --bindir=bar" must fail. There should be no difference between those 2 command lines. In this case it's fine to have it twice because there is no ambiguity, second overrides the first, that's done by python's argparse. --- run_unittests.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/run_unittests.py b/run_unittests.py index fa652a972..204fbfe7f 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2060,10 +2060,8 @@ recommended as it can lead to undefined behaviour on some platforms''') raise Exception('Missing {} value?'.format(arg)) def test_same_dash_option_twice_configure(self): - with self.assertRaises(subprocess.CalledProcessError) as e: - self._test_same_option_twice_configure( - 'bindir', ['--bindir=foo', '--bindir=bar']) - self.assertIn('Pick one.', e.stderr) + self._test_same_option_twice_configure( + 'bindir', ['--bindir=foo', '--bindir=bar']) def test_same_d_option_twice_configure(self): self._test_same_option_twice_configure(