X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Fptest-lava-wrapper-all.sh;h=f7a0b4d8df81a5ff482f68a8287acb2fe10cca0a;hb=f911ecf332aca722c13590a5c0bf085a37d4841e;hp=2d3bbdb085a82a02c1c1aa23b913e4b68084da83;hpb=3719904371e5005e69f2bb668332882a954b2eb9;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/ptest-lava-wrapper-all.sh b/common/scripts/ptest-lava-wrapper-all.sh index 2d3bbdb..f7a0b4d 100755 --- a/common/scripts/ptest-lava-wrapper-all.sh +++ b/common/scripts/ptest-lava-wrapper-all.sh @@ -5,33 +5,10 @@ command -v ptest-runner >/dev/null 2>&1 if [ $? -ne 0 ] ; then lava-test-case ptest-installed --result SKIP else - # Run ptests for specified packages - lava-test-set start ptest-full - - UNIT_LOG=$(ptest-runner 2> results.log ) - 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 passed-commands --result PASS --measurement $test_pass --units pass - if ! [ x"0" = x"$test_fail" ] ; then - lava-test-case failed-commands --result FAIL --measurement $test_fail --units fail - echo "$UNIT_LOG" | grep -e 'FAIL' - fi - else - lava-test-case ptest-runner ptest-full --result fail - fi - - lava-test-set stop ptest-full - + lava-test-case ptest-installed --result PASS + ptest-runner -L lava-test-case ptest-runtime --measurement $SECONDS --units seconds --result PASS fi # Wait for LAVA to parse all the tests from stdout sleep 15 - -cat results.log