commit:     aebeb68573134f1f1879b7513d5051e562dd3b1c
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  4 09:49:24 2024 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Sun Feb  4 09:49:24 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=aebeb685

Use flavor to set MAKEOPTS -j*

Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>

 buildbot_gentoo_ci/steps/portage.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/buildbot_gentoo_ci/steps/portage.py 
b/buildbot_gentoo_ci/steps/portage.py
index 74a8e37..775e076 100644
--- a/buildbot_gentoo_ci/steps/portage.py
+++ b/buildbot_gentoo_ci/steps/portage.py
@@ -228,7 +228,12 @@ class SetHostConf(BuildStep):
         separator2 = ' '
         makeconf_list = []
         log = yield self.addLog('host.conf')
-        makeconf_list.append('MAKEOPTS="-j14"')
+        # set MAKEOPTS from flavor
+        worker_data = yield 
self.gentooci.db.workers.getWorkerByUuid(self.getProperty('workername'))
+        print('worker_data')
+        worker_flavor = yield 
self.gentooci.db.workers.getFlavorById(worker_data['flavor_id'])
+        print('worker_flavor')
+        makeconf_list.append('MAKEOPTS="-j' + str(worker_flavor['cpu']) + '"')
         makeconf_string = separator1.join(makeconf_list)
         print(makeconf_string)
         yield self.build.addStepsAfterCurrentStep([

Reply via email to