zephyr/scripts
Ulf Magnusson 4c6ea2d160 scripts: edtlib: Skip fully loading bindings in more cases
As a slightly hairy but important optimization inherited from the old
scripts, the binding loading code only looks at binding files whose raw
text contains one of the compatible strings from the devicetree. For
such files, a second pass parses the file as YAML and tries to extract a
compatible string, and skips the file if it fails (e.g. due to spurious
text matches in 'include'd binding fragments).

Until now, the binding would always get fully loaded (have 'include'd
files merged in, checks run, etc.) if the second pass managed to extract
a compatible.

Do slightly better by only fully loading the binding if the extracted
compatible from the second pass appears in the devicetree. This gets rid
of unnecessary binding loading in rare cases.

Discovered by test-bindings/deprecated.yaml getting loaded even when
everything that referenced it in test.dts was commented out, because it
happened to mention 'child-binding' in a comment.

Also add a check for YAML errors in the second pass, to be slightly more
robust. Print a warning if a file that isn't valid YAML is found.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-09-22 09:17:53 -05:00
..
checkpatch kernel: rename NANO_ESF 2019-07-25 15:06:58 -07:00
ci ci: run_ci: Refactor west setup into a function 2019-09-18 19:13:37 -05:00
coccinelle scripts/coccinelle: Add script for counting identifier length 2019-04-18 12:29:07 -04:00
dts scripts: edtlib: Skip fully loading bindings in more cases 2019-09-22 09:17:53 -05:00
footprint scripts: footprint: Fix pylint warnings 2019-09-14 13:35:08 +08:00
gitlint zephyr_commit_rules.py: Fix pylint warning by simplifying conditional 2019-09-08 22:19:37 -04:00
kconfig kconfig: support multiple DTS bindings directories 2019-09-16 05:29:27 -05:00
sanity_chk scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
support scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
west_commands west: flash: Fix exception on build folder guessing 2019-09-07 10:24:17 -04:00
.gitignore
checkpatch.pl dts: import vendor-prefixes.txt from linux kernel 2019-05-22 12:40:20 -04:00
checkstack.pl
coccicheck docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
dir_is_writeable.py
elf_helper.py scripts: elf_helper.py: fix C++ template constexpr value processing 2019-09-17 20:49:34 +08:00
file2hex.py file2hex.py: new --gzip-mtime option that defaults to zero + test 2019-04-17 08:27:40 -04:00
filter-known-issues.py filter-known-issues.py: Remove '== True' test 2019-09-08 22:20:20 -04:00
gen_app_partitions.py scripts: Fix random typo'd whitespace 2019-09-07 07:54:17 -04:00
gen_cfb_font_header.py scripts: Fix random typo'd whitespace 2019-09-07 07:54:17 -04:00
gen_gcov_files.py gen_gcov_files.py: Replace bare 'except' with 'except Exception' 2019-09-07 07:58:16 -04:00
gen_kobject_list.py rtc: Remove old rtc functionality 2019-09-14 07:33:38 -05:00
gen_offset_header.py
gen_priv_stacks.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
gen_relocate_app.py scripts: gen_relocate_app.py: add custom align size for relocation 2019-09-19 21:38:31 -04:00
gen_syscall_header.py userspace: Support for split 64 bit arguments 2019-09-12 11:31:50 +08:00
gen_syscalls.py gen_syscalls.py: make 'noweak' a list instead of a random order set 2019-09-19 20:59:06 -04:00
mergehex.py scripts: mergehex: Add --overlap argument 2019-05-16 07:16:55 -05:00
parse_syscalls.py
process_gperf.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
requirements.txt scripts: west_commands: verify minimum cmake version 2019-09-07 10:08:23 -04:00
sanitycheck scripts: sanitycheck: Multiple --west-flash arguments 2019-09-19 22:19:49 -04:00
series-push-hook.sh
spelling.txt
subfolder_list.py cmake: Encode and decode in UTF-8 in build system 2019-07-18 16:50:08 +02:00
tags.sh
valgrind.supp
waitpid
west-commands.yml west: Add completion command 2019-05-10 13:08:27 +02:00
zephyr_module.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00