Bug 1266995 - Use DIST_SUBDIR instead of XPIDL_MODULE in export test; r?glandium
We're about to remove XPIDL_MODULE. Switch to a more appropriate
variable.
MozReview-Commit-ID: 5FU6vcJQM8w
--- a/python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/foo/baz/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/foo/baz/moz.build
@@ -1,7 +1,7 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-XPIDL_MODULE = 'baz'
+DIST_SUBDIR = 'baz'
--- a/python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/inheriting-variables/moz.build
@@ -1,10 +1,10 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-XPIDL_MODULE = 'foobar'
-export("XPIDL_MODULE")
+DIST_SUBDIR = 'foobar'
+export('DIST_SUBDIR')
DIRS += ['foo', 'bar']
--- a/python/mozbuild/mozbuild/test/frontend/test_reader.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_reader.py
@@ -260,17 +260,17 @@ class TestBuildReader(unittest.TestCase)
def test_inheriting_variables(self):
reader = self.reader('inheriting-variables')
contexts = list(reader.read_topsrcdir())
self.assertEqual(len(contexts), 4)
self.assertEqual([context.relsrcdir for context in contexts],
['', 'foo', 'foo/baz', 'bar'])
- self.assertEqual([context['XPIDL_MODULE'] for context in contexts],
+ self.assertEqual([context['DIST_SUBDIR'] for context in contexts],
['foobar', 'foobar', 'baz', 'foobar'])
def test_find_relevant_mozbuilds(self):
reader = self.reader('reader-relevant-mozbuild')
# Absolute paths outside topsrcdir are rejected.
with self.assertRaises(Exception):
reader._find_relevant_mozbuilds(['/foo'])