X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Fptest-lava-wrapper.sh;h=8887d29736be4956ad232c447829c5bf6fe07a23;hb=f911ecf332aca722c13590a5c0bf085a37d4841e;hp=56a104998c332f1b707d7d687ea5d190833740ad;hpb=9aae8071429333a24277a9b5685cf06e4f593892;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/ptest-lava-wrapper.sh b/common/scripts/ptest-lava-wrapper.sh index 56a1049..8887d29 100755 --- a/common/scripts/ptest-lava-wrapper.sh +++ b/common/scripts/ptest-lava-wrapper.sh @@ -1,31 +1,22 @@ #!/bin/bash -REQUIREDPTESTS="acl attr bluez5 busybox dbus-test" - +REQUIREDPTESTS="acl attr xmlsec1 libxml2 lua" +# NOT: systemd openssl openssh # Check if ptest packages are installed + +echo "Testing these components: $REQUIREDPTESTS" + command -v ptest-runner >/dev/null 2>&1 if [ $? -ne 0 ] ; then lava-test-case ptest-installed --result SKIP else + lava-test-case ptest-installed --result PASS + # Run ptests for specified packages for unit in ${REQUIREDPTESTS}; do - UNIT_LOG=$(ptest-runner ${unit} 2> /dev/null) - if [ $? -eq 0 ] ; then - lava-test-set start ptest-$unit - # 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 - lava-test-case failed-commands --result FAIL --measurement $test_fail --units fail - 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