Skip to content

Commit

Permalink
Fix compilation using build_examples on vscode (#12824)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
andy31415 authored and pull[bot] committed Oct 5, 2023
1 parent 3c073f6 commit e36db45
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,16 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
RUN chmod +x /home/$USERNAME/bin/restyle-path
RUN chown -R $USERNAME:$USERNAME /home/$USERNAME
RUN echo "PATH=/home/$USERNAME/bin:${PATH}" >> /home/$USERNAME/.bashrc

# $USERNAME needs to own the esp-idf and tools for the examples to build
RUN chown -R $USERNAME:$USERNAME /opt/espressif/esp-idf
RUN chown -R $USERNAME:$USERNAME /opt/espressif/tools

# $USERNAME needs to own west configuration to build nRF Connect examples
RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/.west
RUN chown -R $USERNAME:$USERNAME /opt/NordicSemiconductor/nrfconnect/

# allow read/write access to header and libraries
RUN chown -R $USERNAME:$USERNAME /opt/ubuntu-21.04-aarch64-sysroot/usr/

# allow licenses to be accepted
RUN chown -R $USERNAME:$USERNAME /opt/android/sdk
14 changes: 9 additions & 5 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,15 @@ def Accept(self, name: str):
return True


class AcceptNameWithSubstring:
def __init__(self, substr: str):
class AcceptNameWithSubstrings:
def __init__(self, substr: List[str]):
self.substr = substr

def Accept(self, name: str):
return self.substr in name
for s in self.substr:
if s in name:
return True
return False


class HostBuildVariant:
Expand Down Expand Up @@ -155,9 +158,10 @@ def HostTargets():
HostBuildVariant(name="no-ble", enable_ble=False),
HostBuildVariant(name="tsan", conflicts=['asan'], use_tsan=True),
HostBuildVariant(name="asan", conflicts=['tsan'], use_asan=True),
HostBuildVariant(name="test-group", test_group=True),
HostBuildVariant(name="test-group",
validator=AcceptNameWithSubstrings(['-all-clusters', '-chip-tool']), test_group=True),
HostBuildVariant(name="same-event-loop",
validator=AcceptNameWithSubstring('-chip-tool'), separate_event_loop=False),
validator=AcceptNameWithSubstrings(['-chip-tool']), separate_event_loop=False),
]

glob_whitelist = set(['ipv6only'])
Expand Down

0 comments on commit e36db45

Please sign in to comment.