diff options
| author | Ha Thach <[email protected]> | 2023-03-22 10:37:06 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-22 10:37:06 +0700 |
| commit | 07976ad26d4fbcad0694aa3a08294af7fd5f759f (patch) | |
| tree | 582a8f1274c33bbdd5b7da28994f897d842495b1 /tools | |
| parent | ec9c666107c0be0f8dc7c2a15e3bdea8c44a50b4 (diff) | |
| parent | f27486e19abcc020c93c0c938c71e3692c21b9f5 (diff) | |
Merge pull request #1968 from hathach/refactor-hid-host
Refactor hid host
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/build_family.py | 4 | ||||
| -rw-r--r-- | tools/get_deps.py | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tools/build_family.py b/tools/build_family.py index cdc099691..532938d42 100644 --- a/tools/build_family.py +++ b/tools/build_family.py @@ -34,7 +34,6 @@ def build_family(example, family, make_option): # sum all element of same index (column sum) return list(map(sum, list(zip(*result)))) - if __name__ == '__main__': # IAR CC if make_iar_option not in sys.argv: @@ -68,7 +67,8 @@ if __name__ == '__main__': print(build_separator) for family in all_families: fret = build_family(example, family, make_iar_option) - total_result = list(map(lambda x, y: x + y, total_result, fret)) + if len(fret) == len(total_result): + total_result = [total_result[i] + fret[i] for i in range(len(fret))] total_time = time.monotonic() - total_time print(build_separator) diff --git a/tools/get_deps.py b/tools/get_deps.py index 8bf56cd8d..4b81d1468 100644 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -105,7 +105,13 @@ def get_a_dep(d): if __name__ == "__main__": status = 0 - deps = list(deps_mandatory.keys()) + sys.argv[1:] + deps = list(deps_mandatory.keys()) + # get all if executed with all as argument + if len(sys.argv) == 2 and sys.argv[1] == 'all': + deps += deps_optional + else: + deps += sys.argv[1:] + with Pool() as pool: status = sum(pool.map(get_a_dep, deps)) sys.exit(status) |
