Bug 1341502: Fix automatic regeneration of backend when an included test manifest changes. r=mshal
MozReview-Commit-ID: 1ZQNQpqboz9
This commit is contained in:
@@ -32,6 +32,9 @@ class TestManifestBackend(PartialBackend):
|
|||||||
|
|
||||||
self.backend_input_files.add(obj.path)
|
self.backend_input_files.add(obj.path)
|
||||||
self.backend_input_files |= obj.context_all_paths
|
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:
|
try:
|
||||||
from reftest import ReftestManifest
|
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('here', o[manifest_path])
|
||||||
self.assertIn('support-files', 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__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user