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>
27 lines
471 B
Bash
Executable File
27 lines
471 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. bootrr
|
|
|
|
TEST_CASE_ID="$1"
|
|
STATE="$2"
|
|
shift 2
|
|
# one or more files to check in batch mode
|
|
LOC="$*"
|
|
|
|
if [ -z "${TEST_CASE_ID}" -o -z "${LOC}" -o -z "${STATE}" ]; then
|
|
echo "Usage: $0 <test-case-id> <path> <desired state> [<timeout>]"
|
|
exit 1
|
|
fi
|
|
|
|
for f in ${LOC}; do
|
|
[ -r "${f}" ] || test_report_exit fail
|
|
|
|
val=$(cat "$f")
|
|
if [ "${val}" != "${STATE}" ]; then
|
|
test_report_exit fail
|
|
fi
|
|
done
|
|
|
|
# if we are here, everything is all right!
|
|
test_report_exit pass
|