Ok, so you're saying to use something like this script https://git.linaro.org/qa/test-definitions.git/blob/HEAD:/common/scripts/ltp... to wrap the test call and parse the output in that script?
I see this script is being called in the following test definition: https://git.linaro.org/qa/test-definitions.git/blob/HEAD:/ubuntu/ltp-ddt.yam....
My goal is to have this wrapper script to be able to see a list of pass or fail with the test cases that were called.
Also, I see lava-test-case-attach is used in the script, isn't it unsupported for now in LAVA v2?
Thanks,
Josue
-----Original Message----- From: linaro-validation [mailto:linaro-validation-bounces@lists.linaro.org] On Behalf Of Neil Williams Sent: Thursday, July 28, 2016 11:08 AM To: linaro-validation@lists.linaro.org Subject: Re: [Linaro-validation] Parse output
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