On 11/08/2012 02:40 PM, Michael Hudson-Doyle wrote:
Paul Sokolovsky paul.sokolovsky@linaro.org writes:
Hello,
I see that YAML syntax for lava_test_shell has landed in linaro-dispatcher trunk, and that old JSON syntax is no longer (automagically) supported. I tried to do a straightforward conversion of http://people.linaro.org/~doanac/lava/lava_test_shell/testdefs/lava-test.jso... , but it throws exceptions trying to parse it. So, can you share examples of the new syntax?
Here is something I've been using:
metadata: format: Lava-Test Test Definition 1.0 name: streamline
run: steps: - "iface=$(ip route | awk '{ if ($1 == "default") { print($5) } }')" - "primary_ip=$(ip addr show "$iface" | awk '{ if ($1 == "inet") { gsub("/.*", "", $2); print($2) } }')" - "echo "<LAVA_SIGNAL_IP $primary_ip>"" - "lava-test-case pystone python -m test.pystone"
parse: pattern: "(?P<test_case_id>.*-*):\s+(?P<result>(pass|fail))"
This parse pattern may be a victim of copy paste. I don't think you have to escape the '' character in YAML, so I think its just a '\s+'