zephyr/scripts
Marcin Niestroj be0f5fe0b0 scripts/sanitycheck: fix merging OVERLAY_CONFIG extra args
Overlay files were concatenated into single string with no whitespace
between them. If '--extra-args OVERLAY_CONFIG="overlay-1.conf"
--extra-args OVERLAY_CONFIG="overlay-2.conf"' was used, then the result
was OVERLAY_CONFIG="overlay-1.confoverlay-2.conf".

Another thing was that overlay extra args were not properly removed from
the list of regular arguments. As a result we had incorrect list of
overlays and incorrect list of other arguments.

Rework code to extract overlays in loop in a safe manner. Use for that a
list of strings instead of string directly. Join those strings and form
a single OVERLAY_CONFIG argument just before running cmake.

Tested with following testcase.yaml line:

  extra_args: ARG1 OVERLAY_CONFIG="overlay-1.conf"
              ARG2 OVERLAY_CONFIG="overlay-2.conf"

Before this patch we got:

  args = ['OVERLAY_CONFIG="overlay-1.conf"',
    'OVERLAY_CONFIG="overlay-2.conf"']

After this patch we get:

  args = ['ARG1', 'ARG2',
    'OVERLAY_CONFIG="overlay-1.conf overlay-2.conf"']

While at it, fix also regex pattern by removing requirement of double
quotes around value. Match any option value instead and strip both
single and double quotes when match is positive. Tested with:

  $ ./scripts/sanitycheck -T samples/hello_world/ -p qemu_x86 \
      --extra-args OVERLAY_CONFIG=overlay1.conf '
      --extra-args OVERLAY_CONFIG=\"overlay2.conf\" '
      --extra-args OVERLAY_CONFIG=\'overlay3.conf\'

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-01-31 15:55:36 -05:00
..
checkpatch kernel: rename NANO_ESF 2019-07-25 15:06:58 -07:00
ci ci: Run also BT edtt_ble_test_app tests 2020-01-31 18:36:40 +01:00
coccinelle scripts/coccinelle: add k_thread create/define to timeout standardization 2019-10-09 08:38:10 -04:00
dts kconfig/devicetree: Print path to headers when configuring 2020-01-31 19:45:43 +01: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/devicetree: Print path to headers when configuring 2020-01-31 19:45:43 +01:00
release scripts: add script for listing closed bugs 2019-10-22 15:11:09 -04:00
sanity_chk global: Fix up leading/trailing blank lines in files 2020-01-27 17:41:55 -06:00
support scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
west_commands west: commands: sign: look for imgtool.py in path 2020-01-30 14:17:07 -05:00
.gitignore
checkpatch.pl syscalls: Remove references to __syscall_inline 2019-12-09 12:47:15 -05:00
checkstack.pl
coccicheck docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
dir_is_writeable.py global: Remove leading/trailing blank lines in files 2019-12-11 19:17:27 +01:00
elf_helper.py kernel: fix 64-bit for kobject generation 2019-12-12 14:48:42 -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 userspace: fix incorrect linker routing 2020-01-09 09:13:23 -08:00
gen_offset_header.py doc: document python build scripts 2020-01-02 17:09:29 -05:00
gen_priv_stacks.py scripts: Simplify code with sys.exit(<string>) 2019-09-08 12:34:16 +02:00
gen_relocate_app.py doc: document python build scripts 2020-01-02 17:09:29 -05:00
gen_syscalls.py syscalls: Remove gen_syscall_header.py 2019-12-09 16:08:50 +01:00
mergehex.py scripts: cmake: move print from python to cmake 2020-01-03 08:20:08 -05:00
parse_syscalls.py userspace: add additional script documentation 2019-03-12 08:37:58 +01:00
process_gperf.py kernel: fix 64-bit for kobject generation 2019-12-12 14:48:42 -08:00
requirements.txt scripts: requirements: Request version 0.24.0 for pyocd 2020-01-13 11:49:57 +01:00
sanitycheck scripts/sanitycheck: fix merging OVERLAY_CONFIG extra args 2020-01-31 15:55:36 -05:00
series-push-hook.sh scripts: fix path issue in push-hook script 2019-03-13 11:59:38 -05:00
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 lvgl: Suppress memory leak errors detected by valgrind 2019-10-21 12:26:35 -07:00
west-commands.yml west: Add completion command 2019-05-10 13:08:27 +02:00
zephyr_module.py modules: fail on invalid ZEPHYR_EXTRA_MODULES 2020-01-31 19:35:43 +01:00