13
13
14
14
class BuildTest ():
15
15
def __init__ (self , desired_ides , tests , targets ):
16
+ #map of targets and the ides that can build programs for them
16
17
self .target_ides = {}
17
18
for target in targets :
18
19
self .target_ides [target ] = []
19
20
for ide in desired_ides :
20
21
if target in EXPORTERS [ide ].TARGETS :
22
+ #target is supported by ide
21
23
self .target_ides [target ].append (ide )
22
24
if len (self .target_ides [target ]) == 0 :
23
25
del self .target_ides [target ]
@@ -27,6 +29,7 @@ def __init__(self, desired_ides, tests, targets):
27
29
28
30
@staticmethod
29
31
def get_pgen_targets (ides ):
32
+ #targets supported by pgen and desired ides for tests
30
33
targs = []
31
34
for ide in ides :
32
35
for target in TARGET_NAMES :
@@ -36,10 +39,12 @@ def get_pgen_targets(ides):
36
39
return targs
37
40
38
41
def _generate_and_build (self , tests ):
42
+ #build results
39
43
successes = []
40
44
failures = []
41
45
for mcu , ides in self .target_ides .items ():
42
46
for test in tests :
47
+ #resolve name alias
43
48
test = get_test_from_name (test )
44
49
for ide in ides :
45
50
project_dir , project_name , project_temp = setup_project (mcu , ide , test )
@@ -78,8 +83,8 @@ def _generate_and_build(self, tests):
78
83
options = parser .parse_args ()
79
84
80
85
tests = options .tests
81
- ides = options .ides
82
- targets = options .targets
86
+ ides = [ ide . lower () for ide in options .ides ]
87
+ targets = [ target . upper () for target in options .targets ]
83
88
84
89
if any (get_test_from_name (test ) is None for test in tests ):
85
90
args_error (parser , "[ERROR] test name not recognized" )
0 commit comments