Hi,
this is my test case: ---------------------------------------------------------------------------------------------------------------------- #!/bin/sh
TMPFILE=/tmp/matrix_temperature.log set -x set -e stress-ng --matrix 0 --matrix-size 1000 -t 1M --tz --log-file $TMPFILE MEASUREMENT=$(awk '$5 ~ /-?[0-9]+.[0-9]+/ && $6=="°C" {print $5}' $TMPFILE ) UNIT=$(awk '$5 ~ /-?[0-9]+.[0-9]+/ && $6=="°C" {print $6}' $TMPFILE )
lava-test-case stress-ng-temperature_1 --result pass --measurement $MEASUREMENT --units $UNIT ----------------------------------------------------------------------------------------------------------------------
An this is the result output:
/lava-280/bin/lava-test-runner /lava-280/0 root@MBa6x:~ [6n/lava-280/bin/lava-test-runner /lava-280/0 Test shell timeout: 10s (minimum of the action and connection timeout) /lava-280/bin/lava-test-runner /lava-280/0 + export 'TESTRUN_ID=0_stress-ng-temperature' + cd /lava-280/0/tests/0_stress-ng-temperature + cat uuid + UUID=280_1.4.2.3.1 + set +x <LAVA_SIGNAL_STARTRUN 0_stress-ng-temperature 280_1.4.2.3.1> Received signal: <STARTRUN> 0_stress-ng-temperature 280_1.4.2.3.1 Starting test lava.0_stress-ng-temperature (280_1.4.2.3.1) Skipping test definition patterns. + ./stress-ng-temperature.sh + set -e + stress-ng --matrix 0 --matrix-size 1000 -t 1M --tz --log-file /tmp/matrix_temperature.log stress-ng: info: [293] dispatching hogs: 2 matrix stress-ng: info: [293] cache allocate: using built-in defaults as unable to determine cache details stress-ng: info: [293] successful run completed in 60.03s (1 min, 0.03 secs) stress-ng: info: [293] matrix: stress-ng: info: [293] imx_thermal_zone 34.01 °C + awk '$5 ~ /-?[0-9]+.[0-9]+/ && $6=="°C" {print $5}' /tmp/matrix_temperature.log + MEASUREMENT=34.01 + awk '$5 ~ /-?[0-9]+.[0-9]+/ && $6=="°C" {print $6}' /tmp/matrix_temperature.log + UNIT='°C' + lava-test-case stress-ng-temperature_1 --result pass --measurement 34.01 --units '°C' + '<LAVA_SIGNAL_TESTCASE' 'TEST_CASE_ID=stress-ng-temperature_1' 'RESULT=pass' 'UNITS=°C' 'MEASUREMENT=34.01>' Received signal: <TESTCASE'> 'TEST_CASE_ID=stress-ng-temperature_1' 'RESULT=pass' 'UNITS=°C' 'MEASUREMENT=34.01 /lava-280/0/tests/0_stress-ng-temperature/run.sh: line 13: <LAVA_SIGNAL_TESTCASE: not found <LAVA_TEST_RUNNER EXIT> Received signal: TESTCASE: not found <LAVA_TEST_RUNNER EXIT Marking unfinished test run as failed definition: lava result: fail duration: 299.34 commit_id: 4736078a5fb93e023ceaa41f883e841edc42dae2 uuid: 280_1.4.2.3.1 case: 0_stress-ng-temperature lava-test-shell timed out after 300 seconds
In my view then test case stress-ng-temperature_1 should be handled as successful. But the job is incomplete because of an timeout. What I doing wrong?
Matthias
Von: Remi Duraffort [mailto:remi.duraffort@linaro.org] Gesendet: Donnerstag, 28. März 2019 15:35 An: Frank, Matthias Matthias.Frank@tq-group.com Cc: lava-users@lists.lavasoftware.org Betreff: Re: [Lava-users] record measurement
Hello Frank,
you have to use "lava-test-case <case-name> --measurement <value> --units <unit> --result <pass|fail>"
Like in https://staging.validation.linaro.org/scheduler/job/250563 See the result with measurements: https://staging.validation.linaro.org/results/250563/0_env-dut-inline
Rgds
Le jeu. 28 mars 2019 à 14:54, Frank, Matthias <Matthias.Frank@tq-group.commailto:Matthias.Frank@tq-group.com> a écrit : Hi,
I want to measure some output values of test cases. I have a shell script which run stress-ng, parse it’s output and exports some measurement variables.
How can I record theses variables? I tried to use lava-test-case –shell myscript.sh –result pass –measurement $VAR1 –unit unit but no values are recorded. Maybe this is the wrong approach, but how can I do this in the correct way?
Matthias _______________________________________________ Lava-users mailing list Lava-users@lists.lavasoftware.orgmailto:Lava-users@lists.lavasoftware.org https://lists.lavasoftware.org/mailman/listinfo/lava-users
-- Rémi Duraffort LAVA Team, Linaro