tests: Add explicit test_dist target

Things like po validation don't need to be done on every test run
This commit is contained in:
Cole Robinson 2018-02-20 12:33:57 -05:00
parent 98d880a179
commit 4205272384
2 changed files with 12 additions and 3 deletions

View File

@ -498,7 +498,7 @@ class TestCommand(TestBaseCommand):
'''
Finds all the tests modules in tests/, and runs them.
'''
excludes = ["test_urls.py", "test_inject.py"]
excludes = ["dist.py", "test_urls.py", "test_inject.py"]
testfiles = self._find_tests_in_dir("tests", excludes)
# Put clitest at the end, since it takes the longest
@ -556,6 +556,14 @@ class TestInitrdInject(TestBaseCommand):
TestBaseCommand.run(self)
class TestDist(TestBaseCommand):
description = "Tests to run before cutting a release"
def run(self):
self._testfiles = ["tests.dist"]
TestBaseCommand.run(self)
class CheckPylint(distutils.core.Command):
user_options = [
("jobs=", "j", "use multiple processes to speed up Pylint"),
@ -672,6 +680,7 @@ distutils.core.setup(
'test_ui': TestUI,
'test_urls': TestURLFetch,
'test_initrd_inject': TestInitrdInject,
'test_dist': TestDist,
},
distclass=VMMDistribution,

View File

@ -53,9 +53,9 @@ def _find_py(dirname):
return ret
class TestMisc(unittest.TestCase):
class TestDist(unittest.TestCase):
"""
Miscellaneous tests
Tests to run before release
"""
def _check_modules(self, files):
for f in files: