mbed-os

Fork of mbed-os by erkin yucel

Committer:
elessair
Date:
Sun Oct 23 15:10:02 2016 +0000
Revision:
0:f269e3021894
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
elessair 0:f269e3021894 1 # Test for configuration data defined in targets
elessair 0:f269e3021894 2 # A base target (B1) defines 3 configuration parameters (base1_1, base1_2 and base1_3)
elessair 0:f269e3021894 3 # A derived target (D1) inherits drom B1 and defines one configuration parameters (derived1 and derived2) and overrides base1_1 and base1_2
elessair 0:f269e3021894 4 # Another base target (B2) defines its own configuration parameters (base2_1 and base2_2)
elessair 0:f269e3021894 5 # The final target F derives from B2 and D1, defines two configuration paramaters (f1_1 and f1_2)
elessair 0:f269e3021894 6 # and overrides base2_1, base1_1, derived2 and its own configuration parameter f1_1 (which is legal)
elessair 0:f269e3021894 7 # Final result:
elessair 0:f269e3021894 8 # base1_1 must have the value defined in F
elessair 0:f269e3021894 9 # base1_2 must have the value defined in D1
elessair 0:f269e3021894 10 # base1_3 must have the value defined in B1
elessair 0:f269e3021894 11 # derived1 must have the value defined in D1
elessair 0:f269e3021894 12 # derived2 must have the value defined in F
elessair 0:f269e3021894 13 # base2_1 must have the value defined in F
elessair 0:f269e3021894 14 # base2_2 must have the value defined in B2
elessair 0:f269e3021894 15 # f1_1 must have the value defined and then overriden in F
elessair 0:f269e3021894 16 # f1_2 must have the value defined in F
elessair 0:f269e3021894 17
elessair 0:f269e3021894 18 expected_results = {
elessair 0:f269e3021894 19 "f": {
elessair 0:f269e3021894 20 "desc": "test multiple target inheritance",
elessair 0:f269e3021894 21 "target.base1_1": "v_base1_1_f",
elessair 0:f269e3021894 22 "target.base1_2": "v_base1_2_d1",
elessair 0:f269e3021894 23 "target.base1_3": "v_base1_3_b1",
elessair 0:f269e3021894 24 "target.derived1": "v_derived1_d1",
elessair 0:f269e3021894 25 "target.derived2": "v_derived2_f",
elessair 0:f269e3021894 26 "target.base2_1": "v_base2_1_f",
elessair 0:f269e3021894 27 "target.base2_2": "v_base2_2_b2",
elessair 0:f269e3021894 28 "target.f1_1": "v_f1_1_f_override",
elessair 0:f269e3021894 29 "target.f1_2": "v_f1_2_f"
elessair 0:f269e3021894 30 },
elessair 0:f269e3021894 31 "b1": {
elessair 0:f269e3021894 32 "desc": "test with a single base target, no inheritance",
elessair 0:f269e3021894 33 "target.base1_1": "v_base1_1_b1",
elessair 0:f269e3021894 34 "target.base1_2": "v_base1_2_b1",
elessair 0:f269e3021894 35 "target.base1_3": "v_base1_3_b1"
elessair 0:f269e3021894 36 },
elessair 0:f269e3021894 37 "d1": {
elessair 0:f269e3021894 38 "desc": "test single target inheritance",
elessair 0:f269e3021894 39 "target.base1_1": "v_base1_1_d1",
elessair 0:f269e3021894 40 "target.base1_2": "v_base1_2_d1",
elessair 0:f269e3021894 41 "target.base1_3": "v_base1_3_b1",
elessair 0:f269e3021894 42 "target.derived1": "v_derived1_d1",
elessair 0:f269e3021894 43 "target.derived2": "v_derived2_d1"
elessair 0:f269e3021894 44 }
elessair 0:f269e3021894 45 }
elessair 0:f269e3021894 46