diff options
| author | hathach <[email protected]> | 2022-07-01 17:23:14 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-07-01 17:23:14 +0700 |
| commit | 53db23142a89def1ad2f866863a559a931eeb035 (patch) | |
| tree | 23d6ff7f3caa3d6febb9a20e201396fcd45f33fe /tools | |
| parent | 5323472afd1f35d0e62bd58bb3293bcfce36483b (diff) | |
add get-dependencies.py
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/get_dependencies.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/get_dependencies.py b/tools/get_dependencies.py new file mode 100644 index 000000000..e7d3e0a76 --- /dev/null +++ b/tools/get_dependencies.py @@ -0,0 +1,25 @@ +import os +import sys +import subprocess + + +# dependency lookup (ABC sorted) +# deps = { +# 'LPC11UXX' : [ [] ] +# } + + +def get_family_dep(family): + for entry in os.scandir("hw/bsp/{}/boards".format(family)): + if entry.is_dir(): + result = subprocess.run("make -C examples/device/board_test BOARD={} get-deps".format(entry.name), + shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + print(result.stdout.decode("utf-8")) + return result.returncode + +status = 0 +all_family = sys.argv[1:] +for f in all_family: + status += get_family_dep(f) + +sys.exit(status)
\ No newline at end of file |
