Merge "Prepare for gating by distro, type, docker type"

This commit is contained in:
Jenkins 2015-08-21 16:49:10 +00:00 committed by Gerrit Code Review
commit 0f2a4e1e0b
2 changed files with 86 additions and 15 deletions

View File

@ -59,31 +59,46 @@ class BuildTest(base.BaseTestCase):
self.assertEqual(failures, 0, "%d failure(s) occurred" % failures)
class BuildTestCentosBinary(BuildTest):
class BuildTestCentosBinaryDocker(BuildTest):
def setUp(self):
super(BuildTestCentosBinary, self).setUp()
super(BuildTestCentosBinaryDocker, self).setUp()
self.build_args.extend(["--base", "centos",
"--type", "binary"])
class BuildTestTemplateCentosBinary(BuildTest):
class BuildTestCentosSourceDocker(BuildTest):
def setUp(self):
super(BuildTestCentosBinary, self).setUp()
super(BuildTestCentosSourceDocker, self).setUp()
self.build_args.extend(["--base", "centos",
"--type", "source"])
class BuildTestUbuntuSourceDocker(BuildTest):
def setUp(self):
super(BuildTestUbuntuSourceDocker, self).setUp()
self.build_args.extend(["--base", "ubuntu",
"--type", "source"])
class BuildTestCentosBinaryTemplate(BuildTest):
def setUp(self):
super(BuildTestCentosBinaryTemplate, self).setUp()
self.build_args.extend(["--base", "centos",
"--type", "binary",
"--template"])
class BuildTestCentosSource(BuildTest):
class BuildTestCentosSourceTemplate(BuildTest):
def setUp(self):
super(BuildTestCentosSource, self).setUp()
self.build_args.extend(["--base", "centos",
"--type", "source"])
class BuildTestTemplateCentosSource(BuildTest):
def setUp(self):
super(BuildTestCentosSource, self).setUp()
super(BuildTestCentosSourceTemplate, self).setUp()
self.build_args.extend(["--base", "centos",
"--type", "source",
"--template"])
class BuildTestUbuntuSourceTemplate(BuildTest):
def setUp(self):
super(BuildTestUbuntuSourceTemplate, self).setUp()
self.build_args.extend(["--base", "ubuntu",
"--type", "source",
"--template"])

60
tox.ini
View File

@ -42,6 +42,7 @@ commands =
sudo -g docker testr run ^(test_images).*
bash -c "if [ -f buildconf.bak ]; then mv buildconf.bak .buildconf; fi"
# deprecated
[testenv:images-centos-binary]
whitelist_externals = find
bash
@ -49,8 +50,9 @@ whitelist_externals = find
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestCentosBinary
sudo -g docker testr run test_build.BuildTestCentosBinaryDocker
# deprecated
[testenv:images-centos-source]
whitelist_externals = find
bash
@ -58,7 +60,61 @@ whitelist_externals = find
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestCentosSource
sudo -g docker testr run test_build.BuildTestCentosSourceDocker
[testenv:images-centos-binary-docker]
whitelist_externals = find
bash
sudo
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestCentosBinaryDocker
[testenv:images-centos-source-docker]
whitelist_externals = find
bash
sudo
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestCentosSourceDocker
[testenv:images-ubuntu-source-docker]
whitelist_externals = find
bash
sudo
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestUbuntuSourceDocker
[testenv:images-centos-binary-template]
whitelist_externals = find
bash
sudo
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestCentosBinaryTemplate
[testenv:images-centos-source-template]
whitelist_externals = find
bash
sudo
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestCentosSourceTemplate
[testenv:images-ubuntu-source-template]
whitelist_externals = find
bash
sudo
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
sudo -g docker testr run test_build.BuildTestUbuntuSourceTemplate
[testenv:startenv]
whitelist_externals = bash