Re-enable test_noop_job test

Add support for tenants in _areAllBuildsComplete().

Story: #2000773

Change-Id: Ie93cb79cc75405bb90cf4d1bae5e0fb00214b975
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2016-11-11 19:56:15 -05:00
parent 503bdedad6
commit debd7a7dbe
4 changed files with 18 additions and 8 deletions

View File

@ -126,3 +126,12 @@
- project-merge:
jobs:
- experimental-project-test
- project:
name: org/noop-project
check:
jobs:
- noop
gate:
jobs:
- noop

View File

@ -0,0 +1 @@
test

View File

@ -2014,7 +2014,6 @@ jobs:
self.assertEqual(len(self.history), 10)
self.assertEqual(self.countJobResults(self.history, 'ABORTED'), 1)
@skip("Disabled for early v3 development")
def test_noop_job(self):
"Test that the internal noop job works"
A = self.fake_gerrit.addFakeChange('org/noop-project', 'master', 'A')

View File

@ -601,13 +601,14 @@ class Scheduler(threading.Thread):
self.log.debug("Waiting on merger")
return False
waiting = False
for pipeline in self.layout.pipelines.values():
for item in pipeline.getAllItems():
for build in item.current_build_set.getBuilds():
if build.result is None:
self.log.debug("%s waiting on %s" %
(pipeline.manager, build))
waiting = True
for tenant in self.abide.tenants.values():
for pipeline in tenant.layout.pipelines.values():
for item in pipeline.getAllItems():
for build in item.current_build_set.getBuilds():
if build.result is None:
self.log.debug("%s waiting on %s" %
(pipeline.manager, build))
waiting = True
if not waiting:
self.log.debug("All builds are complete")
return True