On Thu, 28 Jul 2016 15:05:05 +0000 "Albarran, Josue" j-albarran@ti.com wrote:
Hi,
I ran a simple LTP-DDT test case that produces the following output http://pastebin.ubuntu.com/21280373/. Is there a way to parse this output so that it shows up in results section of the dashboard as a pass. I know you can call lava-test-case from within the script and do the parsing inside the script, but I want to do this for many different test cases. Is there an easier way to do it without changing the test cases?
V2 docs are going to recommend that the implicit pattern at the end of the test definition is hard to get right and this is exactly how it presents. It is a python regex but it has to go through a variety of format tools and debugging the pattern in LAVA takes a lot of time.
The simplest solution here is to take a log of the output, write a custom script that reliably parses the output and which you can test locally. Then either wrap the ltp in that or write the ltp output to a file and process the file. It saves a lot of time in the long run. Scripts like this will remain compatible with V1 and V2.
This doesn't involve changing the test cases and you've done most of the work already by creating a pattern that matches locally - the same process you used to create that pattern is the process to use to create the wrapper script.
(This is what we're doing with the lava-server unit tests.)
I tried the parsing in the test definition as follows http://pastebin.ubuntu.com/21280894/.
I will appreciate any help, thanks.
Josue