@@ -208,6 +208,12 @@ def pytest_addoption(parser):
208208 help = 'force mode for esptool' ,
209209 )
210210 idf_group = parser .getgroup ('embedded-idf' )
211+ idf_group .addoption (
212+ '--supported-targets' , help = 'Comma-separated list of supported targets for the test case. (Default: None)'
213+ )
214+ idf_group .addoption (
215+ '--preview-targets' , help = 'Comma-separated list of preview targets for the test case. (Default: None)'
216+ )
211217 idf_group .addoption (
212218 '--part-tool' ,
213219 help = 'Partition tool path, used for parsing partition table. '
@@ -1207,6 +1213,16 @@ def pytest_configure(config: Config) -> None:
12071213 )
12081214 config .stash [_junit_report_path_key ] = config .option .xmlpath
12091215
1216+ supported_targets_args = config .getoption ('supported_targets' , None )
1217+ preview_targets_args = config .getoption ('preview_targets' , None )
1218+ if supported_targets_args or preview_targets_args :
1219+ from pytest_embedded_idf .utils import preview_targets , supported_targets
1220+
1221+ if supported_targets_args is not None :
1222+ supported_targets .set ([_t .strip () for _t in supported_targets_args .split (',' )])
1223+ if preview_targets_args :
1224+ preview_targets .set ([_t .strip () for _t in preview_targets_args .split (',' )])
1225+
12101226 config .stash [_pytest_embedded_key ] = PytestEmbedded (
12111227 parallel_count = config .getoption ('parallel_count' ),
12121228 parallel_index = config .getoption ('parallel_index' ),
0 commit comments