Fix assertRebuiltTarget with VS backend

For the VS backend, assertRebuiltTarget() asserts the that target is both
recompiled and relinked.  This isn't correct for test_rc_depends_files, as
changing the rc script's dependencies only causes the executable to be
relinked, and not to also have it's source recompiled.

assertRebuiltTarget already gets this right for the ninja backend.
pull/3668/head
Jon Turney 7 years ago committed by Nirbheek Chauhan
parent 7a48f6dfcd
commit 6bab3d40a9
  1. 2
      run_unittests.py

@ -735,9 +735,7 @@ class BasePlatformTests(unittest.TestCase):
self.assertIn('Linking target {}'.format(target), ret)
elif self.backend is Backend.vs:
# Ensure that this target was rebuilt
clre = re.compile('ClCompile:\n [^\n]*cl[^\n]*' + target, flags=re.IGNORECASE)
linkre = re.compile('Link:\n [^\n]*link[^\n]*' + target, flags=re.IGNORECASE)
self.assertRegex(ret, clre)
self.assertRegex(ret, linkre)
elif self.backend is Backend.xcode:
raise unittest.SkipTest('Please help us fix this test on the xcode backend')

Loading…
Cancel
Save