Bug 1426566 - Remove wrapper to compare-mozconfigs; r=froydnj,nalexander

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

--HG--
extra : rebase_source : 9e08ed60eab694a9f20385aa5f85a9909809b199
This commit is contained in:
Gregory Szorc 2018-01-05 14:16:04 -08:00
parent 7e42738fec
commit 252e60c9b2
3 changed files with 12 additions and 46 deletions

View File

@ -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()

View File

@ -9,8 +9,11 @@ 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
@ -155,15 +158,12 @@ def compare(topsrcdir):
return success
class TestCompareMozconfigs(unittest.TestCase):
def test_compare_mozconfigs(self):
topsrcdir = buildconfig.substs['top_srcdir']
self.assertTrue(compare(topsrcdir))
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('topsrcdir', help='Path to root of source checkout')
args = parser.parse_args()
logging.basicConfig(level=logging.INFO)
if not compare(args.topsrcdir):
sys.exit(1)
mozunit.main()

View File

@ -1 +1 @@
[compare-mozconfigs-wrapper.py]
[compare-mozconfigs.py]