ARMmbed / ARMmbed/mbed-tools

Reduce test run time of test_generate_config.py

Open
#241 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
49
Forks
32
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The test_generate_config.py tests take ~5 seconds to complete for 87 tests. This is probably because they're i/o intensive and we don't mock the filesystem.

**To Reproduce**
Steps to reproduce the behavior:
`tox -e py39 -- tests/build/test_generate_config.py`

**Expected behavior**
The unit test suite should run in 10s or less. 15% of the suite shouldn't take >50% of the maximum desired test run time.

**Screenshots**
None

**Desktop (please complete the following information):**
Any

**Mbed (please complete the following information):**
mbed-tools 7.4.0

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by running tox -e py39 -- tests/build/test_generate_config.py and inspect tests/build/test_generate_config.py for filesystem I/O across its 87 tests. The work is done when the tests retain their coverage and the unit test suite meets the stated 10-second target.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
performance, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.