diff --git a/tests/test_build.py b/tests/test_build.py index 03a15e6c4d..1dc25cbd2a 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() - 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"]) diff --git a/tox.ini b/tox.ini index eea4866269..26d5fa0cfb 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