47
47
str (PROJECT_ROOT / 'examples' / '.build-rules.yml' ),
48
48
]
49
49
50
+ # Exclude list for no-pytest apps in CI on merge request or branch pipelines.
51
+ # The below examples will be built on main branch pipeline.
52
+ NO_PYTEST_REMAINING_APPS = [
53
+ {"target" : "esp32c2" , "name" : "light_switch" },
54
+ {"target" : "esp32c6" , "name" : "light_switch" },
55
+ {"target" : "esp32h2" , "name" : "light_switch" },
56
+ {"target" : "esp32" , "name" : "light_switch" },
57
+ {"target" : "esp32c2" , "name" : "generic_switch" },
58
+ {"target" : "esp32c6" , "name" : "generic_switch" },
59
+ {"target" : "esp32h2" , "name" : "generic_switch" },
60
+ {"target" : "esp32h2" , "name" : "multiple_on_off_plugin_units" },
61
+ {"target" : "esp32c3" , "name" : "multiple_on_off_plugin_units" },
62
+ {"target" : "esp32" , "name" : "multiple_on_off_plugin_units" },
63
+ {"target" : "esp32s3" , "name" : "multiple_on_off_plugin_units" },
64
+ {"target" : "esp32" , "name" : "room_air_conditioner" },
65
+ {"target" : "esp32c3" , "name" : "room_air_conditioner" },
66
+ {"target" : "esp32c2" , "name" : "room_air_conditioner" },
67
+ {"target" : "esp32c6" , "name" : "room_air_conditioner" },
68
+ {"target" : "esp32h2" , "name" : "room_air_conditioner" },
69
+ {"target" : "esp32" , "name" : "door_lock" },
70
+ {"target" : "esp32c3" , "name" : "door_lock" },
71
+ {"target" : "esp32c2" , "name" : "door_lock" },
72
+ {"target" : "esp32c6" , "name" : "door_lock" },
73
+ {"target" : "esp32h2" , "name" : "door_lock" },
74
+ {"target" : "esp32s3" , "name" : "ota_provider" },
75
+ {"target" : "esp32c3" , "name" : "sensors" },
76
+ {"target" : "esp32" , "name" : "refrigerator" },
77
+ {"target" : "esp32c3" , "name" : "refrigerator" },
78
+ {"target" : "esp32c2" , "name" : "refrigerator" },
79
+ {"target" : "esp32c6" , "name" : "refrigerator" },
80
+ {"target" : "esp32h2" , "name" : "refrigerator" },
81
+ {"target" : "esp32" , "name" : "demo/badge" },
82
+ ]
83
+ MAINFEST_FILES = [
84
+ str (PROJECT_ROOT / 'examples' / '.build-rules.yml' ),
85
+ ]
86
+
50
87
def _is_c6_pytest_app (app : App ) -> bool :
51
88
print (app .name , app .target )
52
89
for pytest_app in PYTEST_C6_APPS :
@@ -73,6 +110,13 @@ def _is_c2_pytest_app(app: App) -> bool:
73
110
return True
74
111
return False
75
112
113
+ # Function to check for no_pytest excluded list apps.
114
+ def _is_no_pytest_remaining_app (app : App ) -> bool :
115
+ for no_pytest_app in NO_PYTEST_REMAINING_APPS :
116
+ if app .name == no_pytest_app ["name" ] and app .target == no_pytest_app ["target" ]:
117
+ return True
118
+ return False
119
+
76
120
def get_cmake_apps (
77
121
paths : List [str ],
78
122
target : str ,
@@ -97,7 +141,7 @@ def main(args: argparse.Namespace) -> None:
97
141
# no_pytest and only_pytest can not be both True
98
142
assert not (args .no_pytest and args .pytest_c6 and args .pytest_h2 and args .pytest_c3 and args .pytest_c2 )
99
143
if args .no_pytest :
100
- apps_for_build = [app for app in apps if not (_is_c6_pytest_app (app ) or _is_h2_pytest_app (app ))]
144
+ apps_for_build = [app for app in apps if not (_is_c6_pytest_app (app ) or _is_h2_pytest_app (app ) or _is_no_pytest_remaining_app ( app ) )]
101
145
elif args .pytest_c6 :
102
146
apps_for_build = [app for app in apps if _is_c6_pytest_app (app )]
103
147
elif args .pytest_h2 :
@@ -106,6 +150,8 @@ def main(args: argparse.Namespace) -> None:
106
150
apps_for_build = [app for app in apps if _is_c3_pytest_app (app )]
107
151
elif args .pytest_c2 :
108
152
apps_for_build = [app for app in apps if _is_c2_pytest_app (app )]
153
+ elif args .no_pytest_remaining :
154
+ apps_for_build = [app for app in apps if _is_no_pytest_remaining_app (app )]
109
155
else :
110
156
apps_for_build = apps [:]
111
157
@@ -164,7 +210,12 @@ def main(args: argparse.Namespace) -> None:
164
210
parser .add_argument (
165
211
'--no_pytest' ,
166
212
action = "store_true" ,
167
- help = 'Exclude pytest apps, definded in PYTEST_H2_APPS and PYTEST_C6_APPS' ,
213
+ help = 'Exclude pytest apps definded in PYTEST_H2_APPS and PYTEST_C6_APPS and some optional no-pytest apps' ,
214
+ )
215
+ parser .add_argument (
216
+ '--no_pytest_remaining' ,
217
+ action = "store_true" ,
218
+ help = 'Build the excluded no-pytest apps using manual trigger.' ,
168
219
)
169
220
parser .add_argument (
170
221
'--pytest_c6' ,
0 commit comments