aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Dake <stdake@cisco.com>2015-08-16 13:01:08 -0700
committerSteven Dake <stdake@cisco.com>2015-08-18 00:22:02 -0700
commit79d9951634285faeebb08d232502a1c47a5ef1dc (patch)
treeec5f30db4e8a40a06fe663be35f186543a1cdaa7
parent20deecda98f457fdff7ae5bb41fcdd3f0ff5362f (diff)
downloadkolla-79d9951634285faeebb08d232502a1c47a5ef1dc.tar.gz
kolla-79d9951634285faeebb08d232502a1c47a5ef1dc.zip
Prepare for gating by distro, type, docker type
We will gate on all combos of: /docker /docker_templates Centos Ubuntu Binary Source Except for Ubuntu + Binary because there is no delorean style repository for Ubuntu. Change-Id: Ic1ed8c22c2f86ff339299939da9ac492a7c7c5f5 Partially-Impelements: blueprint gate-source-builds
-rw-r--r--tests/test_build.py35
-rw-r--r--tox.ini60
2 files changed, 83 insertions, 12 deletions
diff --git a/tests/test_build.py b/tests/test_build.py
index 03a15e6c4..1dc25cbd2 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -60,31 +60,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()
+ super(BuildTestCentosSourceTemplate, self).setUp()
self.build_args.extend(["--base", "centos",
- "--type", "source"])
+ "--type", "source",
+ "--template"])
-class BuildTestTemplateCentosSource(BuildTest):
+class BuildTestUbuntuSourceTemplate(BuildTest):
def setUp(self):
- super(BuildTestCentosSource, self).setUp()
- self.build_args.extend(["--base", "centos",
+ super(BuildTestUbuntuSourceTemplate, self).setUp()
+ self.build_args.extend(["--base", "ubuntu",
"--type", "source",
"--template"])
diff --git a/tox.ini b/tox.ini
index eea486626..26d5fa0cf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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