Skip to content

Commit 5bcd97a

Browse files
Merge pull request #4984 from theotherjimmy/unify-unit-tests
Unify mbed OS tools testing style with what's used in mbed-ls, htrun, greentea
2 parents 9b85155 + 6bf7718 commit 5bcd97a

File tree

132 files changed

+705
-1025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+705
-1025
lines changed

.travis.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ script:
1919
- |
2020
find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
2121
- make -C events/equeue test clean
22-
- PYTHONPATH=. python tools/test/config_test/config_test.py
23-
- PYTHONPATH=. python tools/test/build_api/build_api_test.py
24-
- PYTHONPATH=. python tools/test/targets/target_test.py
25-
- python tools/test/pylint.py
26-
- py.test tools/test/toolchains/api.py
27-
- python tools/test/memap/memap_test.py
28-
- python tools/project.py -S
29-
- python tools/build_travis.py
22+
- PYTHONPATH=. coverage run -a -m pytest tools/test
23+
- python2 tools/test/pylint.py
24+
- coverage run -a tools/project.py -S
25+
- python2 tools/build_travis.py
26+
- coverage html
27+
after_success:
28+
- coveralls
3029
before_install:
3130
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
3231
- sudo add-apt-repository -y ppa:libreoffice/libreoffice-4-2
@@ -42,3 +41,5 @@ install:
4241
- pip install pylint
4342
- pip install hypothesis
4443
- pip install mock
44+
- pip install coverage
45+
- pip install coveralls

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ We run continuous integration on all of our branches and pull requests to verify
2121
- Master branch [![Master Branch CI Badge](https://travis-ci.org/ARMmbed/mbed-os.svg?branch=master)](https://travis-ci.org/ARMmbed/mbed-os)
2222
- Latest release [![Latest Tag CI Badge](https://travis-ci.org/ARMmbed/mbed-os.svg?branch=latest)](https://travis-ci.org/ARMmbed/mbed-os/branches)
2323

24+
Tools coverage [![Coverage Status](https://coveralls.io/repos/github/ARMmbed/mbed-os/badge.svg?branch=master)](https://coveralls.io/github/ARMmbed/mbed-os?branch=master)
25+
2426
## Getting Started for Developers
2527

2628
You need [mbed CLI](https://github.com/ARMmbed/mbed-cli) to build mbed OS. For more details, read the [mbed OS Handbook](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"test_target": {
3+
"lib1.p1": "v_p1_lib1_app",
4+
"lib1.p2": "v_p2_lib1",
5+
"lib1.p3": "v_p3_lib1",
6+
"lib2.p1": "v_p1_lib2_app",
7+
"lib2.p2": "v_p2_lib2"
8+
}
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"K64F": {
3+
"exception_msg": "not found"
4+
}
5+
}

tools/test/config_test/test02/targets.json renamed to tools/test/config/compound_inheritance/targets.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"b1": {
2+
"base": {
33
"extra_labels": [],
44
"default_lib": "std",
55
"core": "Cortex-M0",
@@ -9,8 +9,8 @@
99
"base1_3": "v_base1_3_b1"
1010
}
1111
},
12-
"d1": {
13-
"inherits": ["b1"],
12+
"left_middle": {
13+
"inherits": ["base"],
1414
"config": {
1515
"derived1": "v_derived1_d1",
1616
"derived2": "v_derived2_d1"
@@ -20,8 +20,8 @@
2020
"base1_2": "v_base1_2_d1"
2121
}
2222
},
23-
"b2": {
24-
"inherits": ["b1"],
23+
"right_middle": {
24+
"inherits": ["base"],
2525
"config": {
2626
"base2_1": "v_base2_1_b2",
2727
"base2_2": "v_base2_2_b2"
@@ -30,8 +30,8 @@
3030
"base1_2": "v_base1_2_b2"
3131
}
3232
},
33-
"f": {
34-
"inherits": ["d1", "b2"],
33+
"inherits_diamond": {
34+
"inherits": ["left_middle", "right_middle"],
3535
"config": {
3636
"f1_1": "v_f1_1_f",
3737
"f1_2": "v_f1_2_f"

0 commit comments

Comments
 (0)