~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/buildmaster/doc/buildqueue.txt

Mass renaming of imports and references to IBuild/Build/IBuildSet

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
The IBuild record related to this job is provided by the 'build'
32
32
attribute:
33
33
 
34
 
    >>> from lp.soyuz.interfaces.build import IBuildSet
35
 
    >>> build = getUtility(IBuildSet).getByQueueEntry(bq)
 
34
    >>> from lp.soyuz.interfaces.binarypackagebuild import IBinaryPackageBuildSet
 
35
    >>> build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
36
36
    >>> build.id
37
37
    8
38
38
    >>> build.buildstate.name
124
124
    True
125
125
    >>> print job.logtail
126
126
    Dummy sampledata entry, not processing
127
 
    >>> build = getUtility(IBuildSet).getByQueueEntry(job)
 
127
    >>> build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(job)
128
128
    >>> print build.buildstate.name
129
129
    BUILDING
130
130
    >>> print job.lastscore
255
255
Note that the results are ordered by descending BuildQueue.lastscore
256
256
and restricted
257
257
 
258
 
    >>> for bq in getUtility(IBuildSet).calculateCandidates(archseries):
259
 
    ...     build = getUtility(IBuildSet).getByQueueEntry(bq)
 
258
    >>> for bq in getUtility(IBinaryPackageBuildSet).calculateCandidates(archseries):
 
259
    ...     build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
260
260
    ...     print "%s (%s, %d)" % (build.title, bq.lastscore, bq.id)
261
261
    hppa build of pmount 0.1-2 in ubuntu hoary RELEASE (1500, 4)
262
262
    i386 build of alsa-utils 1.0.9a-4ubuntu1 in ubuntu hoary RELEASE (1000, 2)
287
287
The fake language pack will be queued behind the other source packages
288
288
as intended.
289
289
 
290
 
    >>> for bq in getUtility(IBuildSet).calculateCandidates(archseries):
291
 
    ...     build = getUtility(IBuildSet).getByQueueEntry(bq)
 
290
    >>> for bq in getUtility(IBinaryPackageBuildSet).calculateCandidates(archseries):
 
291
    ...     build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
292
292
    ...     print "%s (%s, %d)" % (build.title, bq.lastscore, bq.id)
293
293
    hppa build of pmount 0.1-2 in ubuntu hoary RELEASE (1500, 4)
294
294
    i386 build of alsa-utils 1.0.9a-4ubuntu1 in ubuntu hoary RELEASE (1000, 2)
299
299
Restricting the domain to only hoary/hppa:
300
300
 
301
301
    >>> archseries = [hoary['hppa']]
302
 
    >>> for bq in getUtility(IBuildSet).calculateCandidates(archseries):
303
 
    ...     build = getUtility(IBuildSet).getByQueueEntry(bq)
 
302
    >>> for bq in getUtility(IBinaryPackageBuildSet).calculateCandidates(archseries):
 
303
    ...     build = getUtility(IBinaryPackageBuildSet).getByQueueEntry(bq)
304
304
    ...     print "%s (%s, %d)" % (build.title, bq.lastscore, bq.id)
305
305
    hppa build of pmount 0.1-2 in ubuntu hoary RELEASE (1500, 4)
306
306
    hppa build of alsa-utils 1.0.9a-4 in ubuntu hoary RELEASE (500, 3)
308
308
This method asserts a valid 'archseries' argument, None or an empty
309
309
list will result in a AssertionFailure.
310
310
 
311
 
    >>> getUtility(IBuildSet).calculateCandidates(None).count()
 
311
    >>> getUtility(IBinaryPackageBuildSet).calculateCandidates(None).count()
312
312
    Traceback (most recent call last):
313
313
    ...
314
314
    AssertionError: Given 'archseries' cannot be None/empty.
315
315
 
316
 
    >>> getUtility(IBuildSet).calculateCandidates([]).count()
 
316
    >>> getUtility(IBinaryPackageBuildSet).calculateCandidates([]).count()
317
317
    Traceback (most recent call last):
318
318
    ...
319
319
    AssertionError: Given 'archseries' cannot be None/empty.