|
From: | John W. Eaton |
Subject: | Re: AW: Re: Re: BuildBots no longer run make check? |
Date: | Tue, 12 Jun 2018 15:40:04 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 06/06/2018 12:51 PM, address@hidden wrote:
jwe wrote:Note that I'm not an expert in python or buildbot. Any suggestions and improvements are welcome, especially for filtering the log files to properly report success/failure for the tests with buildbot version 1.x.I really don't know whether I understand what is going on. But might this change help?: diff -r 4ad92f00bca5 master.cfg --- a/master.cfg Tue Jun 05 12:38:50 2018 +0000 +++ b/master.cfg Tue Jun 05 22:04:40 2018 +0200 @@ -272,7 +272,7 @@ ## FIXME: should probably search for the "^Summary:$" line just ## before the PASS/FAIL totals. - logtext = "".join(self.getLog('stdio').readlines()) + logtext = "\n".join(self.getLog('stdio').readlines()) m = re.search (r"^ *FAIL +([0-9]+) *$", logtext, flags = re.MULTILINE)After digging a little deeper in the buildbot docs, I assume that self.getLog('stdio') returns a buildbot.process.log.Log object. These objects don't seem to have a readlines method. In fact the documentation states [1]: "This class handles write-only access to log files from running build steps. It does not provide an interface for reading logs - such access should occur directly through the Data API." Maybe adding a buildbot.process.logobserver.BufferLogObserver and using its getStdout would do what is needed. [2] Or we could use a LogObserver and wait for the FAIL or REGRESSION line and set a property that can be used in the evaluateCommand function. Somewhat similar to [3]. Unfortunately, I don't have a buildbot test setup and I'm by far not comfortable enough in Python to write some code without testing. I hope this might be helpful anyways. Markus [1]: http://docs.buildbot.net/current/developer/cls-log.html [2]: http://docs.buildbot.net/current/developer/cls-logobserver.html#buildbot.process.logobserver.BufferLogObserver [3]: http://docs.buildbot.net/latest/manual/customization.html#adding-logobservers
I also don't have a way to easily test changes other than to modify the Octave buidlbot configuration and force a build to run.
These rules worked for the earlier 0.8.x installation. I'm pretty sure I copied and modified them slightly from an example that I found (unfortunately, not sure where).
My recollection is there was some kind of default log file processing for the test step but it didn't do exactly the right thing. Is there no longer something like that for the test step that we could start with and modify as needed?
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |