tast-tests: cros/remote/power: fix panic when power persona tests are skipped In the PowerQual test execution, if all tests within a given persona are skipped (e.g. because the DUT is a Chromebox and lacks a battery), the `minutesBatteryLifeValues` slice remains empty. Previously, passing this empty slice to `stat.HarmonicMean` resulted in an unhandled panic (`floats: zero length slice`) crashing the entire test run. This CL adds a safeguard to explicitly check if the length of the slice is zero before invoking the math calculations, safely skipping the persona's aggregation if no tests were run. BUG=b:571949227 TEST=tast run <dut> meta.PowerQual.fw_qual (on a device without a battery) Change-Id: I88e4628d2baa607c34f3e7b702553f880c1e05d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tast-tests/+/8550436 Tast-Review: Yanye Li <yanyeli@google.com> Reviewed-by: Jing Li <jingmuli@google.com> Reviewed-by: Yanye Li <yanyeli@google.com> Tested-by: Andrew Luo <aluo@chromium.org> Commit-Queue: Andrew Luo <aluo@chromium.org>
This repository contains integration tests that are run by Tast.
helpers/ - Source code for binaries executed by tests.local/ - Helpers for local tests that are compiled and installed to /usr/local/libexec/tast/helpers/local/cros by the tast-local-helpers-cros package.src/go.chromium.org/tast-tests/cros/Shared code, the main tast executable, the local_test_runner and remote_test_runner executables responsible for running bundles, and documentation are located in the tast repository.