Bug 1132771 - Add a test for reading all moz.build files in file metadata mode draft
authorGregory Szorc <gps@mozilla.com>
Thu, 12 Feb 2015 19:03:15 -0800
changeset 243053 cfe32922599a48121ec58255f51db351a6de1f80
parent 243052 473f3239c79f42de5eba1b4b8e34ca29d7e1a8de
child 243054 d9e060dde9a775d921c2bd137bc35aec2c40a935
push id698
push usergszorc@mozilla.com
push dateMon, 16 Feb 2015 20:34:37 +0000
bugs1132771
milestone38.0a1
Bug 1132771 - Add a test for reading all moz.build files in file metadata mode XXX TODO THIS IS NOT THE CORRECT APPROACH XXX
python/mozbuild/mozbuild/test/frontend/test_reader.py
--- a/python/mozbuild/mozbuild/test/frontend/test_reader.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_reader.py
@@ -5,16 +5,17 @@
 from __future__ import unicode_literals
 
 import os
 import sys
 import unittest
 
 from mozunit import main
 
+from mozbuild.base import MozbuildObject
 from mozbuild.frontend.reader import BuildReaderError
 from mozbuild.frontend.reader import BuildReader
 
 from mozbuild.test.common import MockConfig
 
 import mozpack.path as mozpath
 
 
@@ -329,11 +330,17 @@ class TestBuildReader(unittest.TestCase)
     def test_read_relevant_mozbuilds(self):
         reader = self.reader('reader-relevant-mozbuild')
 
         paths, context = reader.read_relevant_mozbuilds(['d1/every-level/a/file',
             'd1/every-level/b/file', 'd2/file'])
         self.assertEqual(len(paths), 3)
         self.assertEqual(len(paths), 3)
 
+    def test_relevant_file_reading(self):
+        mb = MozbuildObject.from_environment()
+        config = mb.config_environment
+        reader = BuildReader(config)
+        paths, contexts = reader.read_relevant_mozbuilds(reader.all_mozbuild_paths())
+
 
 if __name__ == '__main__':
     main()