Age | Commit message (Collapse) | Author | Files | Lines |
|
os.listdir() can throw exceptions like for eg FileNotFoundError
if the path passed as argument does not exist, so we need to
handle these exceptions otherwise RESULT=unknown is returned.
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
In the section 'Using the unittest Command-Line Interface' there are
some examples that use the python command instead of python3. python
usually points to python2 which is deprecated, so update the examples to
use python3.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Since kernel commit aa984f1ba4a4 ("iio: cros_ec: Register to
cros_ec_sensorhub when EC supports FIFO") the trigger attribute for some
sensors is only exposed when the FIFO feature is not supported. So only
check that attribute when that feature is not supported and on kernels
before that patch was introduced.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Since kernel commit aa984f1ba4a4 ("iio: cros_ec: Register to
cros_ec_sensorhub when EC supports FIFO") the trigger attribute for some
sensors is only exposed when the FIFO feature is not supported. So only
check that attribute when that feature is not supported and on kernels
before that patch was introduced.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The 'frequency' IIO sysfs entry doesn't seem to exist neither is
documented in the Documentation/ABI, so remove it.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The 'frequency' IIO sysfs entry doesn't seem to exist neither is
documented in the Documentation/ABI, so remove it.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
There is a bug where, after a reboot, the Fingerprint firmware stays in a loop
and can't switch to the RW firmware.
This test checks that the transition from RO to RW happens.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
To check the sysfs ABI, we use only the suffix ec, fp, pd and tp as
name. We will have in the future, though, other embedded controllers
that will not start with the "cros_" prefix, like the "wilco_ec". To
solve those cases change the code to use the full device name.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
When we renamed the test suite we introduced some warnings when
generating the documentations. Fix those warning by aligning the title
underline with the title.
docs/source/install.rst:15: WARNING: Title underline too short.
docs/source/install.rst:22: WARNING: Title underline too short.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
We want to ensure that all available MCUs reply to the basic hello command.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
As now is name Chome OS EC Test Suite, rename all occurences to the old
name in documentation to the new name.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
This test suite is meant for test the Chrome OS Embedded Controller and
all its drivers, rename the project to cros-ec-tests to make it explicit
that the focus is the Chrome OS Embedded Controller.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Create the in-code documentation for the test cases for automodule
documentation.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Create the in-code documentation for helper functions for automodule
documentation.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
This section describes the testing framework and format standards for
tests in crostests package.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The id() method returns a string identifying the specific test case. This
is usually the full name of the test method, including the module and
class name. For now it is not really useful have this information
printed on this runner, so strip the module and the class name and only
print the specific test name.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
This chapter explains how to install the crostests package and build its
documentation.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Have a helpers and runners packages is too generic, so create a 'cros'
package to avoid future conflicts and to make clear the scope of the
modules inside the 'cros' package.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
To be coherent with the name, rename the test definition name from
cros-ec.yaml to crostests.yaml.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Use Sphinx to for documenting the project.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The test was buggy and only checked the device name and state. Now, we
also check all the cable names and states.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
This fixes the following error:
helpers/kernel.py:5:1: E302 expected 2 blank lines, found 1
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
'black' is a program that autoformats code following most of the rules
in PEP 8. Run that program in order to autformat current files.
Install 'black' using pip. It requires Python 3.6+ to run:
$ pip install black
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Use one file for all the tests is unmaintaneable and not scalable. Now
that we have some basic tests already implemented is time to reorganize
the test suite and split the unique test script in a structured set of
python scripts.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Add a Lava-Test Definition to be able to run the test suite in the LAVA
dispatcher using lqa.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The scripts checks the embedded controller and other MCU ABI to ensure
that all required files are present.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Python community recommends against making the python name point to
Python 3. The PEP-394 states that:
"If the python command is installed, it should invoke the same
version of Python as the python2 command."
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
This feature never landed to mainline and is failing for all devices, so
remove the test.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Frequency sysfs attribute have been replaced by the
standard sampling_frequency after 5.4.0. We need to check
the version of running kernel to decide if we must check it.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Frequency sysfs attribute have been replaced by the
standard sampling_frequency after 5.4.0. We need to check
the version of running kernel to decide if we must check it.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Implement a helper to simplify the code and avoid code duplication.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
Add one function to convert version major and minor
to an integer.
Add a function to get the running kernel version and
convert it using the previous function.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The line where base_patch was defined was dropped during merge or commit
rework.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
In order to avoid code duplication or errors and to simplify code,
this patch adds a function to return the content of a file. It also
replaces pieces of code reading sysfs files by the new function.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
ACCEL_1G_IN_MS2 and ACCEL_MAG_VALID_OFFSET variables
are not global to the class but local to the function.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
This patch adds a function to check that the backlight brightness affects
value of duty cycle of the PWM in debugfs.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
In order to verify that accelerometer data are consistent, we
compute the magnitude that should beclose to 1G.
This patch is inspired from kernel_CrosECSysfsAccel.py [1]
[1] https://chromium.googlesource.com/chromiumos/third_party/autotest/+/refs/heads/master/client/site_tests/kernel_CrosECSysfs/kernel_CrosECSysfs.py
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The script checks the RTC ABI that all required files are present.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The scripts checks the extcon usbc ABI that all required files are present.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The scripts checks the battery ABI that all required
files are present.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The scripts checks in the charger power supply ABI that all required
files are present.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The scripts checks the IIO gyroscope ABI by verifying
that all required files are present.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
The scripts checks the IIO accelerometer ABI by verifying
that all required files are present.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
supported for cutoff tests
The cutoff tests should only run if the EC_FEATURE_BATTERY is supported
by the Embedded Controller. Also assert the sysfs ile exists.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|
|
This is a basic script test written in python to test basic
functionality on CrOS EC. The purpose is use this script as a base for a
more complex tests.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
|