diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-02-16 21:57:53 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-02-22 06:49:34 +0530 |
commit | 225d842e4c5aa5159c4e706f071dba4a9fdb0958 (patch) | |
tree | 0d232fdedd31fad60eaac106ca62f65b617a9e3c /run_unittests.py | |
parent | 26615ac422e0591e23624d124488fb82cc472875 (diff) | |
download | meson-225d842e4c5aa5159c4e706f071dba4a9fdb0958.zip meson-225d842e4c5aa5159c4e706f071dba4a9fdb0958.tar.gz meson-225d842e4c5aa5159c4e706f071dba4a9fdb0958.tar.bz2 |
unit tests: Make assertBuildNoOp check stricter
We also need to verify that no CustomBuild targets were rebuilt.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/run_unittests.py b/run_unittests.py index f26ab7e..7a22903 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1706,15 +1706,15 @@ class BasePlatformTests(unittest.TestCase): if self.backend is Backend.ninja: self.assertIn(ret.split('\n')[-2], self.no_rebuild_stdout) elif self.backend is Backend.vs: - # Ensure that some target said that no rebuild was done + # Ensure that some target of each type said that no rebuild was done + # We always have at least one CustomBuild target for the regen checker self.assertIn('CustomBuild:\n All outputs are up-to-date.', ret) self.assertIn('ClCompile:\n All outputs are up-to-date.', ret) self.assertIn('Link:\n All outputs are up-to-date.', ret) # Ensure that no targets were built - clre = re.compile('ClCompile:\n [^\n]*cl', flags=re.IGNORECASE) - linkre = re.compile('Link:\n [^\n]*link', flags=re.IGNORECASE) - self.assertNotRegex(ret, clre) - self.assertNotRegex(ret, linkre) + self.assertNotRegex(ret, re.compile('CustomBuild:\n [^\n]*cl', flags=re.IGNORECASE)) + self.assertNotRegex(ret, re.compile('ClCompile:\n [^\n]*cl', flags=re.IGNORECASE)) + self.assertNotRegex(ret, re.compile('Link:\n [^\n]*link', flags=re.IGNORECASE)) elif self.backend is Backend.xcode: raise unittest.SkipTest('Please help us fix this test on the xcode backend') else: |