Skip to content

Commit 177fb79

Browse files
committed
Rework config_test to use py.test
1 parent 9983821 commit 177fb79

File tree

122 files changed

+202
-393
lines changed

Some content is hidden

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

122 files changed

+202
-393
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ 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=. coverage run tools/test/config_test/config_test.py
22+
- PYTHONPATH=. coverage run -m pytest tools/test/config_test/config_test.py tools/test/toolchains/api.py
2323
- PYTHONPATH=. coverage run tools/test/build_api/build_api_test.py
2424
- PYTHONPATH=. coverage run tools/test/targets/target_test.py
2525
- coverage run tools/test/pylint.py
26-
- coverage run -m pytest tools/test/toolchains/api.py
2726
- coverage run tools/test/memap/memap_test.py
2827
- coverage run tools/project.py -S
2928
- coverage run tools/build_travis.py
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
{
3+
"test_target": {
4+
"lib1.p1": "v_p1_lib1_app",
5+
"lib1.p2": "v_p2_lib1",
6+
"lib1.p3": "v_p3_lib1",
7+
"lib2.p1": "v_p1_lib2_app",
8+
"lib2.p2": "v_p2_lib2"
9+
}
10+
}
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/test_data.py renamed to tools/test/config_test/compound_inheritance/test_data.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
# This is similar to test1, but this time B2 also inherits from B1, which allows it to override its config data.
2-
# B2 also overrides base1_2, like D1.
3-
# The order of inheritace in F is also reversed ([D1, B2] instead of [B2, D1])
4-
# Since the last override of base1_2 in inheritance order is in B2, base1_2 must now
5-
# have the value that was overriden in B2, not in D1.
6-
# This test also shows that multiple inheritance works for a simple diamond shaped inheritance pattern
71

8-
expected_results = {
2+
{
93
"f": {
10-
"desc": "test multiple target inheritance (diamond shape)",
114
"target.base1_1": "v_base1_1_f",
125
"target.base1_2": "v_base1_2_b2",
136
"target.base1_3": "v_base1_3_b1",
@@ -19,7 +12,6 @@
1912
"target.f1_2": "v_f1_2_f"
2013
},
2114
"b2": {
22-
"desc": "another single inheritance test",
2315
"target.base1_1": "v_base1_1_b1",
2416
"target.base1_2": "v_base1_2_b2",
2517
"target.base1_3": "v_base1_3_b1",

0 commit comments

Comments
 (0)