diff options
author | 2022-09-25 13:42:02 +0200 | |
---|---|---|
committer | 2022-09-25 13:42:02 +0200 | |
commit | 1a48ccb70732fa8367c36c842861c080c03eb1a2 (patch) | |
tree | c415c16690d09be9693b26237d2f84c1776b4095 | |
parent | Update gitlab patch for 3.6.1 (diff) | |
download | tinderbox-cluster-1a48ccb70732fa8367c36c842861c080c03eb1a2.tar.gz tinderbox-cluster-1a48ccb70732fa8367c36c842861c080c03eb1a2.tar.bz2 tinderbox-cluster-1a48ccb70732fa8367c36c842861c080c03eb1a2.zip |
Add support for test on merge_request
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
-rw-r--r-- | buildbot_gentoo_ci/steps/builders.py | 10 | ||||
-rw-r--r-- | buildbot_gentoo_ci/steps/portage.py | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/buildbot_gentoo_ci/steps/builders.py b/buildbot_gentoo_ci/steps/builders.py index 3b6a8d0..00980e3 100644 --- a/buildbot_gentoo_ci/steps/builders.py +++ b/buildbot_gentoo_ci/steps/builders.py @@ -1296,6 +1296,16 @@ class SetupStepts(BuildStep): if build: yield log.addStdout('Runing Build: YES\n') aftersteps_list.append(RunBuild()) + # run tests + test = False + if self.getProperty('projectrepository_data')['test']: + test = True + if self.getProperty('projectrepository_data')['test_mr'] and self.getProperty("event") == 'merge_request': + test = True + if test: + yield log.addStdout('Runing Test: YES\n') + else: + yield log.addStdout('Runing Test: NO\n') # run eclean pkg and dist #if build: #f.addStep(builders.RunEclean(step='pkg') diff --git a/buildbot_gentoo_ci/steps/portage.py b/buildbot_gentoo_ci/steps/portage.py index ff06c58..6d838d7 100644 --- a/buildbot_gentoo_ci/steps/portage.py +++ b/buildbot_gentoo_ci/steps/portage.py @@ -295,7 +295,12 @@ class SetPackageDefault(BuildStep): yield log.addStdout(line + separator1) # for test we need to add env and use #FIXME: check restrictions, test use mask and required use + test = False if self.getProperty('projectrepository_data')['test']: + test = True + if self.getProperty('projectrepository_data')['test_mr'] and self.getProperty("event") == 'merge_request': + test = True + if test: auxdb_iuses = yield self.gentooci.db.versions.getMetadataByUuidAndMatadata(self.getProperty("version_data")['uuid'], 'iuse') for auxdb_iuse in auxdb_iuses: iuse, status = getIUseValue(auxdb_iuse['value']) |