Skip to content

Commit 3451566

Browse files
andy31415pull[bot]
authored andcommitted
Fix compilation using build_examples on vscode (#12824)
* Test group option is not valid for all applications. Only provide it for some apps * More changes to allow docker to build out of the box android/nrf/crosscompile * Restyle fixes
1 parent e81b851 commit 3451566

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

.devcontainer/Dockerfile

+9-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,16 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
5353
RUN chmod +x /home/$USERNAME/bin/restyle-path
5454
RUN chown -R $USERNAME:$USERNAME /home/$USERNAME
5555
RUN echo "PATH=/home/$USERNAME/bin:${PATH}" >> /home/$USERNAME/.bashrc
56+
5657
# $USERNAME needs to own the esp-idf and tools for the examples to build
5758
RUN chown -R $USERNAME:$USERNAME /opt/espressif/esp-idf
5859
RUN chown -R $USERNAME:$USERNAME /opt/espressif/tools
60+
5961
# $USERNAME needs to own west configuration to build nRF Connect examples
60-
RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/.west
62+
RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/
63+
64+
# allow read/write access to header and libraries
65+
RUN chown -R $USERNAME:$USERNAME /opt/ubuntu-21.04-aarch64-sysroot/usr/
66+
67+
# allow licenses to be accepted
68+
RUN chown -R $USERNAME:$USERNAME /opt/android/sdk

scripts/build/build/targets.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,15 @@ def Accept(self, name: str):
9999
return True
100100

101101

102-
class AcceptNameWithSubstring:
103-
def __init__(self, substr: str):
102+
class AcceptNameWithSubstrings:
103+
def __init__(self, substr: List[str]):
104104
self.substr = substr
105105

106106
def Accept(self, name: str):
107-
return self.substr in name
107+
for s in self.substr:
108+
if s in name:
109+
return True
110+
return False
108111

109112

110113
class HostBuildVariant:
@@ -155,9 +158,10 @@ def HostTargets():
155158
HostBuildVariant(name="no-ble", enable_ble=False),
156159
HostBuildVariant(name="tsan", conflicts=['asan'], use_tsan=True),
157160
HostBuildVariant(name="asan", conflicts=['tsan'], use_asan=True),
158-
HostBuildVariant(name="test-group", test_group=True),
161+
HostBuildVariant(name="test-group",
162+
validator=AcceptNameWithSubstrings(['-all-clusters', '-chip-tool']), test_group=True),
159163
HostBuildVariant(name="same-event-loop",
160-
validator=AcceptNameWithSubstring('-chip-tool'), separate_event_loop=False),
164+
validator=AcceptNameWithSubstrings(['-chip-tool']), separate_event_loop=False),
161165
]
162166

163167
glob_whitelist = set(['ipv6only'])

0 commit comments

Comments
 (0)