mirror of
https://github.com/linux-msm/bootrr.git
synced 2026-02-25 13:12:03 -08:00
Instead of reporting each thermal zone independently, test them all in batch mode, and report one test case. When looking at the lists of test results we will now have the same tests name for any platform instead of a different number of tests executed for each of them. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
29 lines
518 B
Bash
Executable File
29 lines
518 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. bootrr
|
|
|
|
TEST_CASE_ID="$1"
|
|
LOW="$2"
|
|
HIGH="$3"
|
|
shift 3
|
|
# one or more files to check in batch mode
|
|
LOC="$*"
|
|
|
|
if [ -z "${TEST_CASE_ID}" -o -z "${LOC}" -o -z "${LOW}" -o -z "${HIGH}" ]; then
|
|
echo "Usage: $0 <test-case-id> <path> <low> <high> [<timeout>]"
|
|
exit 1
|
|
fi
|
|
|
|
for f in ${LOC}; do
|
|
|
|
[ -r "${f}" ] || test_report_exit fail
|
|
|
|
val=$(cat "${f}")
|
|
if [ "${val}" -lt "${LOW}" -o "${val}" -gt "${HIGH}" ]; then
|
|
test_report_exit fail
|
|
fi
|
|
done
|
|
|
|
# if we are here, everything is all right!
|
|
test_report_exit pass
|