Bug 1426566 - Remove wrapper to compare-mozconfigs; r?Build
Recent refactoring made the wrapper pretty useless. Since I'm about
to look at this code once more, let's remove it while we're here.
MozReview-Commit-ID: GA9cKeLH7Iu
deleted file mode 100644
--- a/build/compare-mozconfig/compare-mozconfigs-wrapper.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/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/.
-
-from __future__ import unicode_literals
-
-import logging
-import mozunit
-import os
-import subprocess
-import unittest
-
-from buildconfig import substs
-
-log = logging.getLogger(__name__)
-
-
-class TestCompareMozconfigs(unittest.TestCase):
- def test_compare_mozconfigs(self):
- topsrcdir = substs['top_srcdir']
-
- ret = subprocess.call([
- substs['PYTHON'],
- os.path.join(topsrcdir, 'build', 'compare-mozconfig',
- 'compare-mozconfigs.py'),
- topsrcdir
- ])
-
- self.assertEqual(0, ret)
-
-
-if __name__ == '__main__':
- mozunit.main()
--- a/build/compare-mozconfig/compare-mozconfigs.py
+++ b/build/compare-mozconfig/compare-mozconfigs.py
@@ -4,18 +4,21 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# originally from https://hg.mozilla.org/build/tools/file/4ab9c1a4e05b/scripts/release/compare-mozconfigs.py
from __future__ import unicode_literals
import logging
import os
-import sys
import difflib
+import unittest
+
+import buildconfig
+import mozunit
FAILURE_CODE = 1
SUCCESS_CODE = 0
PLATFORMS = (
'linux32',
'linux64',
'macosx64',
@@ -150,20 +153,17 @@ def compare(topsrcdir):
platform,
whitelist)
if not passed:
success = False
return success
-if __name__ == '__main__':
- import argparse
-
- parser = argparse.ArgumentParser()
- parser.add_argument('topsrcdir', help='Path to root of source checkout')
+class TestCompareMozconfigs(unittest.TestCase):
+ def test_compare_mozconfigs(self):
+ topsrcdir = buildconfig.substs['top_srcdir']
+ self.assertTrue(compare(topsrcdir))
- args = parser.parse_args()
+if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
-
- if not compare(args.topsrcdir):
- sys.exit(1)
+ mozunit.main()
--- a/build/compare-mozconfig/python.ini
+++ b/build/compare-mozconfig/python.ini
@@ -1,1 +1,1 @@
-[compare-mozconfigs-wrapper.py]
+[compare-mozconfigs.py]