I give up on my 1/7th release numbers. I will be following the standard numbers from now on.
0.6
This release involved getting a patch submitted to Bugzilla, doing a ton of thinking and starting writing my parser.
Initial Patch Submitted and Thinking
I have submitted a patch to Bugzilla on my bug. This patch:
- Creates a mozconfig enable timing, timing program and timestamp format option
- Puts timestamps using the above options into some tests. Right now, it is doing them for XPCShell test which use test_all.sh and the check:: make target (minus the feeds test suite)
Working on this patch has showed me how varied the testing frameworks are. I am a little nervous about continuing along this path without confirmation of my approach. Originally I was hoping to customize the time stamp formatting but I now realise that there is very little pay off for a ton of effort. From now on, I am going to be using exclusively epoch based times. This makes it easy because if I continue with this approach, I’d need to get a make option visible in JavaScript, which I don’t know how to do.
My other option would be to modify BuildBot. This option would involve overriding the existing LogFile class to have one which did timing. This new type of LogFile would only be used on Mozilla testing buildsteps. This would make it a lot easier to add the timestamps but would be harder to parse and would be useless outside of BuildBot.
If you are at all familiar with Mozilla’s testing framework I’d love your opinion.
Parser
I have started writing my log file parser. I have most standard output being parsed fine. Right now, everything but Mochitest based tests and some obscure tests are able to be parsed. I will be making a screen capture this week to highlight my parser for my second Demo.
It works by reading all the lines in the specified file into an array. It then goes through each line and decides if it is part of a unit test. If it is, it is narrowed down to the type of test it is (reftest, xpcshell test, etc). Once that is done, the line is sent to the initialiser for that type of test’s output. These classes understand each type of test output and parse accordingly. Once this is done, the parser spits out a list of output as specified my bug.
Some things this parser doesn’t do
- There are obscurely formatted tests early on in the “make -k check” output. They aren’t looked at
- Mochitest output is not parsed because there are no timestamps.
- The Log class doesn’t have information about itself and won’t until it is injected into the log somehow
- Some test failures generate multi-line output bounded by “<<<<<<" and ">>>>>>” lines. This is not being handled right now, but I have an idea that will take care of it
- Parse all non-epoch date/time information into Unix time
Sample output
1/1 | 20090213-014025 | ../../_tests/xpcshell-simple/test_necko/unit/test_bug321706.js | local-osx | TEST-PASS | all tests passed | http://www.example.com/waterfall
1/1 | 20090213-014025 | ../../_tests/xpcshell-simple/test_necko/unit/test_bug331825.js | local-osx | TEST-PASS | all tests passed | http://www.example.com/waterfall
1/1 | 20090213-014025 | ../../_tests/xpcshell-simple/test_necko/unit/test_bug336501.js | local-osx | TEST-PASS | all tests passed | http://www.example.com/waterfall
1/1 | 20090213-014025 | ../../_tests/xpcshell-simple/test_necko/unit/test_bug337744.js | local-osx | TEST-PASS | all tests passed | http://www.example.com/waterfall
The 1/1, local-osx and url are placeholder values.
I would like to investigate using a parser generator at some point in the coming week.
