mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1341502: Fix automatic regeneration of backend when an included test manifest changes. r=mshal
MozReview-Commit-ID: 1ZQNQpqboz9 --HG-- extra : rebase_source : 6e5a4f6f037d00ea59a28d392060059f1b38b365
This commit is contained in:
parent
164d6cbbee
commit
a46cc7117e
@ -32,6 +32,9 @@ class TestManifestBackend(PartialBackend):
|
||||
|
||||
self.backend_input_files.add(obj.path)
|
||||
self.backend_input_files |= obj.context_all_paths
|
||||
for source in obj.source_relpaths:
|
||||
self.backend_input_files.add(mozpath.join(obj.topsrcdir,
|
||||
source))
|
||||
try:
|
||||
from reftest import ReftestManifest
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
[test_bar.js]
|
@ -0,0 +1,2 @@
|
||||
[test_foo.js]
|
||||
[include:mochitest-common.ini]
|
@ -0,0 +1,6 @@
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
MOCHITEST_MANIFESTS += [
|
||||
'mochitest.ini',
|
||||
]
|
@ -68,6 +68,25 @@ class TestTestManifestBackend(BackendTester):
|
||||
self.assertIn('here', o[manifest_path])
|
||||
self.assertIn('support-files', o[manifest_path])
|
||||
|
||||
def test_test_manifest_sources(self):
|
||||
"""Ensure that backend sources are generated correctly."""
|
||||
env = self._consume('test-manifests-backend-sources', TestManifestBackend)
|
||||
|
||||
backend_path = mozpath.join(env.topobjdir, 'backend.TestManifestBackend.in')
|
||||
self.assertTrue(os.path.exists(backend_path))
|
||||
|
||||
status_path = mozpath.join(env.topobjdir, 'config.status')
|
||||
|
||||
with open(backend_path, 'r') as fh:
|
||||
sources = set(mozpath.relpath(source.strip(), env.topsrcdir)
|
||||
for source in fh)
|
||||
|
||||
self.assertEquals(sources,
|
||||
set(['mochitest.ini',
|
||||
'mochitest-common.ini',
|
||||
'moz.build',
|
||||
mozpath.relpath(status_path, env.topsrcdir)]))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user