Skip to content

Commit

Permalink
Backed out changeset f7a0080dfd6b (bug 1184405) for SM build bustage …
Browse files Browse the repository at this point in the history
…CLOSED TREE
  • Loading branch information
KWierso committed Sep 25, 2015
1 parent cb424cc commit 8c81872
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions config/tests/test_mozbuild_reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from mozunit import main

from mozbuild.base import MozbuildObject
from mozpack.files import FileFinder
from mozbuild.frontend.context import Files
from mozbuild.frontend.reader import (
BuildReader,
EmptyConfig,
Expand Down Expand Up @@ -67,35 +65,6 @@ def test_filesystem_traversal_no_config(self):
self.assertEqual(set(paths.keys()), all_paths)
self.assertGreaterEqual(len(contexts), len(paths))

def test_orphan_file_patterns(self):
mb = MozbuildObject.from_environment(detect_virtualenv_mozinfo=False)
config = mb.config_environment
reader = BuildReader(config)
all_paths = self._mozbuilds(reader)
_, contexts = reader.read_relevant_mozbuilds(all_paths)

finder = FileFinder(config.topsrcdir, find_executables=False,
ignore=['obj*'])

def pattern_exists(pat):
return [p for p in finder.find(pat)] != []

for ctx in contexts:
if not isinstance(ctx, Files):
continue
relsrcdir = ctx.relsrcdir
if not pattern_exists(os.path.join(relsrcdir, ctx.pattern)):
self.fail("The pattern '%s' in a Files() entry in "
"'%s' corresponds to no files in the tree.\n"
"Please update this entry." %
(ctx.pattern, ctx.main_path))
test_files = ctx['IMPACTED_TESTS'].files
for p in test_files:
if not pattern_exists(os.path.relpath(p.full_path, config.topsrcdir)):
self.fail("The pattern '%s' in a dependent tests entry "
"in '%s' corresponds to no files in the tree.\n"
"Please update this entry." %
(p, ctx.main_path))

if __name__ == '__main__':
main()

0 comments on commit 8c81872

Please sign in to comment.