diff options
| author | HiFiPhile <[email protected]> | 2024-04-08 21:44:14 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-04-08 21:44:14 +0200 |
| commit | adc7a78fd6fbdccbe5f586391997052f2becd149 (patch) | |
| tree | 68108df608468572c43c1e65c578f6954aecf69f /tools/build_utils.py | |
| parent | 9570836cece0beb6c61f1cc97e5de25dac136394 (diff) | |
| parent | 42decf28f1bf7512a4c3e7402c9daf83ee241191 (diff) | |
Merge branch 'master' of github.com:HiFiPhile/tinyusb into vendor_fifo
Diffstat (limited to 'tools/build_utils.py')
| -rw-r--r-- | tools/build_utils.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tools/build_utils.py b/tools/build_utils.py index 5d735bc17..b66b64b97 100644 --- a/tools/build_utils.py +++ b/tools/build_utils.py @@ -64,18 +64,19 @@ def skip_example(example, board): skip_file = ex_dir / "skip.txt" only_file = ex_dir / "only.txt" - if skip_file.exists() and only_file.exists(): - raise RuntimeError("Only have a skip or only file. Not both.") - elif skip_file.exists(): + if skip_file.exists(): skips = skip_file.read_text().split() - return ("mcu:" + mcu in skips or - "board:" + board in skips or - "family:" + family in skips) - elif only_file.exists(): + if ("mcu:" + mcu in skips or + "board:" + board in skips or + "family:" + family in skips): + return True + + if only_file.exists(): onlys = only_file.read_text().split() - return not ("mcu:" + mcu in onlys or - "board:" + board in onlys or - "family:" + family in onlys) + if not ("mcu:" + mcu in onlys or + "board:" + board in onlys or + "family:" + family in onlys): + return True return False |
