aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
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):