diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-04-02 00:40:05 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 00:40:05 +0300 |
commit | 75219989ca468923142738d93df8aef64e897b8e (patch) | |
tree | 225bab977e67835540dddc8f0506f51378e861f5 /run_unittests.py | |
parent | 663517d23376809fd6bc0b69549ee823a06682d7 (diff) | |
parent | a4b2fbc807e2459f50dc43950753737f558e782b (diff) | |
download | meson-75219989ca468923142738d93df8aef64e897b8e.zip meson-75219989ca468923142738d93df8aef64e897b8e.tar.gz meson-75219989ca468923142738d93df8aef64e897b8e.tar.bz2 |
Merge pull request #5128 from Ericson2314/sanity-check-with-flags
Sanity check with external args
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/run_unittests.py b/run_unittests.py index f381efc..7ceb553 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -4373,12 +4373,11 @@ class LinuxlikeTests(BasePlatformTests): cmd_std = '-std=FAIL' env_flags = p.upper() + 'FLAGS' os.environ[env_flags] = cmd_std - self.init(testdir) - cmd = self.get_compdb()[0]['command'] - qcmd_std = " {} ".format(cmd_std) - self.assertIn(qcmd_std, cmd) - with self.assertRaises(subprocess.CalledProcessError, - msg='{} should have failed'.format(qcmd_std)): + with self.assertRaises((subprocess.CalledProcessError, mesonbuild.mesonlib.EnvironmentException), + msg='C compiler should have failed with -std=FAIL'): + self.init(testdir) + # ICC won't fail in the above because additional flags are needed to + # make unknown -std=... options errors. self.build() def test_compiler_c_stds(self): |