Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cover cpu idle genio (New) #1063

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Cover cpu idle genio (New) #1063

merged 2 commits into from
Mar 14, 2024

Conversation

fernando79513
Copy link
Collaborator

@fernando79513 fernando79513 commented Mar 13, 2024

Description

After the inclusion of genio tests on the contrib area of checkbox, we have to add unit-tests to ensure the coverage requirements are satisfied. We have included unit-tests for the cpu_idle.py script.

Resolved issues

https://warthogs.atlassian.net/browse/CHECKBOX-1297 (partly)

Documentation

There are no changes to the documentation

Tests

To run the unittests:

cd ~/checkbox/contrib/genio
pytest

Coverage Report

Module statements missing excluded branches partial coverage
bin/cpu_idle.py 142 1 0 50 1 99%
bin/pmic_regulator.py 49 1 0 16 1 97%
bin/spidev_test.py 37 1 0 12 1 96%
bin/dvfs_gpu_check_governors.py 25 1 0 12 1 95%
bin/linux_ccf.py 45 1 0 18 2 95%
bin/serialcheck.py 34 1 0 8 1 95%
bin/boot_partition.py 91 91 0 28 0 0%
bin/brightness_test.py 92 92 0 30 0 0%
bin/gpio_loopback_test.py 92 92 0 24 0 0%
Total 607 281 0 198 7 54%

@fernando79513 fernando79513 changed the title Cover cpu idle genio Cover cpu idle genio (New) Mar 13, 2024
Copy link
Contributor

@kissiel kissiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, thanks! +1

@baconYao
Copy link
Contributor

Hi @fernando79513, I appreciate your efforts. But here are some thing that you have to understand.

  1. The cpu_idle.py in contrib area is a bit out of date since we added additional SoC, mt8370, recently.
  1. f-string is supported from python 3.6 , therefore, all the f-string snippet have to be modified, otherwise, Checkbox's CI will break on python 3.5 checking.

@kissiel kissiel merged commit 41b9f58 into main Mar 14, 2024
4 checks passed
@kissiel kissiel deleted the cover-cpu-idle-genio branch March 14, 2024 13:42
LiaoU3 pushed a commit to LiaoU3/checkbox that referenced this pull request Mar 20, 2024
* Fixed typo on cpu_idle

* Added tests for cpu_idle
binli pushed a commit to binli/checkbox that referenced this pull request Mar 22, 2024
* Fixed typo on cpu_idle

* Added tests for cpu_idle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants