forked from zephyrproject-rtos/west
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
project: Restricting projects from being located in west folder
Fixes: zephyrproject-rtos#102 This commit introduces a list of restricted folders that are compared against project defined paths to ensure a manifest does not contain paths ending in the west folder, e.g.: - west - west/foo - foo/../west while still allowing folders, such as: - west-ext as project folder. Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
- Loading branch information
Showing
5 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/west/manifest/invalid_restricted_project_normalized_path.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
manifest: | ||
defaults: | ||
remote: testremote | ||
|
||
remotes: | ||
- name: testremote | ||
url-base: https://example.com | ||
|
||
projects: | ||
- name: foo1 | ||
path: foo/../west |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
manifest: | ||
defaults: | ||
remote: testremote | ||
|
||
remotes: | ||
- name: testremote | ||
url-base: https://example.com | ||
|
||
projects: | ||
- name: foo1 | ||
path: west |
11 changes: 11 additions & 0 deletions
11
tests/west/manifest/invalid_restricted_project_sub_path.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
manifest: | ||
defaults: | ||
remote: testremote | ||
|
||
remotes: | ||
- name: testremote | ||
url-base: https://example.com | ||
|
||
projects: | ||
- name: foo1 | ||
path: west/foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters