ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.26k stars 16.87k forks source link

improve autotest.ardupilot.org html #13132

Open tridge opened 4 years ago

tridge commented 4 years ago

Out autotest server is regularly detecting failing builds for specific boards, but we are not displaying those failed builds in a useful manner. It would be good to rework the html generation to be more useful. We really need a failing builds section that tells us exactly what builds are failing.

The html used on autotest.ardupilot.org is generated using Tools/autotest/autotest.py, in the function write_webresults(). It gathers results while autotest is running, calling functions like TestResults.add() to build up the results. The problem with this approach is that it is very slow when changing the html display, as you have to re-run autotest, which takes a long time.

I think the first step should be to create a new python script which splits out the html generation into a standalone script that can generate the html using the autotest-output.txt file. All of the information about the autotest run is in that file in text form, it just needs to be parsed with appropriate regular expressions. If we could re-generate the index.html using a standalone script then making improvements to the output format would be much easier, as testing a change would only take a few seconds instead of hours.

The autotest-output.txt file already has markers in it to allow easy parsing. For example, this shows all of the failed builds:

egrep '^BB..Failed.build.of' autotest-output.txt

and this shows all of the steps, with timestamps:

egrep '^>>>>' autotest-output.txt

Once we can generate the existing index.html using a standalone script then we can start adding useful features. Some ideas:

peterbarker commented 4 years ago

On Mon, 30 Dec 2019, Andrew Tridgell wrote:

The autotest-output.txt file already has markers in it to allow easy parsing. For example, this shows all of the failed builds:

Any reason not to have autotest write the html out nicely? At the end of everything it has a list of tests it ran etc etc but we don't use that information particularly well.