X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Fptest-lava-wrapper.sh;fp=common%2Fscripts%2Fptest-lava-wrapper.sh;h=8e6e87944a768b5b3d49554ad487e1cc87b535fe;hb=435237023d1368d7d73085006f021f9307fde520;hp=21635ce5fd5467d8dbf7b69fcbb23e83b7a7df4c;hpb=4f56ed2afbc39ada5978280801c41d7ce903bc9c;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/ptest-lava-wrapper.sh b/common/scripts/ptest-lava-wrapper.sh index 21635ce..8e6e879 100755 --- a/common/scripts/ptest-lava-wrapper.sh +++ b/common/scripts/ptest-lava-wrapper.sh @@ -12,26 +12,9 @@ if [ $? -ne 0 ] ; then else # Run ptests for specified packages for unit in ${REQUIREDPTESTS}; do - lava-test-set start ptest-$unit - UNIT_LOG=$(ptest-runner ${unit} 2> /dev/null) - if [ $? -eq 0 ] ; then - # grep: Get only the ptests results, no log - # sed 1: replace spaces by hyphens - # sed 2: remove any special character - # sed 3: find status and test name, wrap it in a lava-test-case call - # sh: execute the lava-test-case commands - test_pass=$(echo "$UNIT_LOG" | grep -e 'PASS' | wc -l) - test_fail=$(echo "$UNIT_LOG" | grep -e 'FAIL' | wc -l) - lava-test-case ${unit}-passed-commands --result PASS --measurement $test_pass --units pass - if ! [ x"0" = x"$test_fail" ] ; then - lava-test-case ${unit}-failed-commands --result FAIL --measurement $test_fail --units fail - echo "$UNIT_LOG" | grep -e 'FAIL' - fi - lava-test-set stop ptest-$unit - else - lava-test-case ptest-runner-${unit} --result fail - fi + ptest-runner -L ${unit} done + lava-test-case ptest-runtime --measurement $SECONDS --units seconds --result PASS fi