Please sign in to comment.
scripts/sanitycheck: fix ZEPHYR_BASE subdir check edge case
There is a case where using startswith to determine if a path is a subdirectory of another path can erroneously match. When using a testcase root outside of ZEPHYR_BASE, an erroneous match will cause the relative path containing ".." to get prepended to the test output directory. Example: $HOME/zephyr/zephyr # ZEPHYR_BASE $HOME/zephyr/zephyr-rust/tests # testcase root The relative path prepended to the testcase name is ../zephyr-rust/tests and an example test output dir is ./sanity-out/qemu_x86/../zephyr-rust/tests/rust/rust.main In this case, the build directory escapes the board directory and is no longer unique. Parallel tests then clobber each other. Use pathlib instead of string matching to cover this case. Signed-off-by: Tyler Hall <email@example.com>
- Loading branch information...