mirror of
https://github.com/platformio/platformio-core.git
synced 2025-10-04 17:40:57 +02:00
Test examples from the official dev-platforms
This commit is contained in:
@@ -26,15 +26,25 @@ import click
|
||||
envvar="PIO_INSTALL_DEVPLATFORMS_IGNORE",
|
||||
help="Ignore names split by comma",
|
||||
)
|
||||
def main(desktop, ignore):
|
||||
@click.option(
|
||||
"--ownernames",
|
||||
envvar="PIO_INSTALL_DEVPLATFORMS_OWNERNAMES",
|
||||
help="Filter dev-platforms by ownernames (split by comma)",
|
||||
)
|
||||
def main(desktop, ignore, ownernames):
|
||||
platforms = json.loads(
|
||||
subprocess.check_output(
|
||||
["platformio", "platform", "search", "--json-output"]
|
||||
).decode()
|
||||
)
|
||||
ignore = [n.strip() for n in (ignore or "").split(",") if n.strip()]
|
||||
ownernames = [n.strip() for n in (ownernames or "").split(",") if n.strip()]
|
||||
for platform in platforms:
|
||||
skip = [not desktop and platform["forDesktop"], platform["name"] in ignore]
|
||||
skip = [
|
||||
not desktop and platform["forDesktop"],
|
||||
platform["name"] in ignore,
|
||||
ownernames and platform["ownername"] not in ownernames,
|
||||
]
|
||||
if any(skip):
|
||||
continue
|
||||
subprocess.check_call(["platformio", "platform", "install", platform["name"]])
|
||||
|
Reference in New Issue
Block a user