aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-04-02 00:40:05 +0300
committerGitHub <noreply@github.com>2019-04-02 00:40:05 +0300
commit75219989ca468923142738d93df8aef64e897b8e (patch)
tree225bab977e67835540dddc8f0506f51378e861f5 /run_unittests.py
parent663517d23376809fd6bc0b69549ee823a06682d7 (diff)
parenta4b2fbc807e2459f50dc43950753737f558e782b (diff)
downloadmeson-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-xrun_unittests.py11
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):