Skip to content

Commit

Permalink
Add simulated app to python builder and update cert docker image (pro…
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton36 authored Mar 21, 2023
1 parent deea7f9 commit 47bf1fa
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
6 changes: 4 additions & 2 deletions integrations/docker/images/chip-cert-bins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ RUN case ${TARGETPLATFORM} in \
--target linux-x64-ota-provider-ipv6only \
--target linux-x64-ota-requestor-ipv6only \
--target linux-x64-lock-ipv6only \
--target linux-x64-simulated-app1-ipv6only \
build \
&& mv out/linux-x64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \
&& mv out/linux-x64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \
Expand All @@ -242,6 +243,7 @@ RUN case ${TARGETPLATFORM} in \
&& mv out/linux-x64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \
&& mv out/linux-x64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \
&& mv out/linux-x64-lock-ipv6only/chip-lock-app out/chip-lock-app \
&& mv out/linux-x64-simulated-app1-ipv6only/chip-app1 out/chip-app1 \
;; \
"linux/arm64")\
set -x \
Expand All @@ -257,6 +259,7 @@ RUN case ${TARGETPLATFORM} in \
--target linux-arm64-ota-provider-ipv6only \
--target linux-arm64-ota-requestor-ipv6only \
--target linux-arm64-lock-ipv6only \
--target linux-arm64-simulated-app1-ipv6only \
build \
&& mv out/linux-arm64-all-clusters-ipv6only/chip-all-clusters-app out/chip-all-clusters-app \
&& mv out/linux-arm64-all-clusters-minimal-ipv6only/chip-all-clusters-minimal-app out/chip-all-clusters-minimal-app \
Expand All @@ -268,12 +271,11 @@ RUN case ${TARGETPLATFORM} in \
&& mv out/linux-arm64-ota-provider-ipv6only/chip-ota-provider-app out/chip-ota-provider-app \
&& mv out/linux-arm64-ota-requestor-ipv6only/chip-ota-requestor-app out/chip-ota-requestor-app \
&& mv out/linux-arm64-lock-ipv6only/chip-lock-app out/chip-lock-app \
&& mv out/linux-arm64-simulated-app1-ipv6only/chip-app1 out/chip-app1 \
;; \
*) ;; \
esac

RUN scripts/examples/gn_build_test_example.sh app1

RUN source scripts/activate.sh && scripts/build_python.sh -m platform -d true -i no

# Stage 3: Copy relevant cert bins to a minimal image to reduce size.
Expand Down
2 changes: 2 additions & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def BuildHostTarget():
TargetPart('shell', app=HostApp.SHELL),
TargetPart('ota-provider', app=HostApp.OTA_PROVIDER, enable_ble=False),
TargetPart('ota-requestor', app=HostApp.OTA_REQUESTOR, enable_ble=False),
TargetPart('simulated-app1', app=HostApp.SIMULATED_APP1, enable_ble=False),
TargetPart('simulated-app2', app=HostApp.SIMULATED_APP2, enable_ble=False),
TargetPart('python-bindings', app=HostApp.PYTHON_BINDINGS),
TargetPart('tv-app', app=HostApp.TV_APP),
TargetPart('tv-casting-app', app=HostApp.TV_CASTING),
Expand Down
16 changes: 16 additions & 0 deletions scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class HostApp(Enum):
CERT_TOOL = auto()
OTA_PROVIDER = auto()
OTA_REQUESTOR = auto()
SIMULATED_APP1 = auto()
SIMULATED_APP2 = auto()
PYTHON_BINDINGS = auto()
EFR32_TEST_RUNNER = auto()
TV_CASTING = auto()
Expand Down Expand Up @@ -88,6 +90,8 @@ def ExamplePath(self):
return 'shell/standalone'
elif self == HostApp.OTA_PROVIDER:
return 'ota-provider-app/linux'
elif self in [HostApp.SIMULATED_APP1, HostApp.SIMULATED_APP2]:
return 'placeholder/linux/'
elif self == HostApp.OTA_REQUESTOR:
return 'ota-requestor-app/linux'
elif self in [HostApp.ADDRESS_RESOLVE, HostApp.TESTS, HostApp.PYTHON_BINDINGS, HostApp.CERT_TOOL]:
Expand Down Expand Up @@ -155,6 +159,12 @@ def OutputNames(self):
elif self == HostApp.CERT_TOOL:
yield 'chip-cert'
yield 'chip-cert.map'
elif self == HostApp.SIMULATED_APP1:
yield 'chip-app1'
yield 'chip-app1.map'
elif self == HostApp.SIMULATED_APP2:
yield 'chip-app2'
yield 'chip-app2.map'
elif self == HostApp.OTA_PROVIDER:
yield 'chip-ota-provider-app'
yield 'chip-ota-provider-app.map'
Expand Down Expand Up @@ -351,6 +361,12 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE,
self.extra_gn_options.append('chip_project_config_include_dirs=["//config/python"]')
self.build_command = 'chip-repl'

if self.app == HostApp.SIMULATED_APP1:
self.extra_gn_options.append('chip_tests_zap_config="app1"')

if self.app == HostApp.SIMULATED_APP2:
self.extra_gn_options.append('chip_tests_zap_config="app2"')

def GnBuildArgs(self):
if self.board == HostBoard.NATIVE:
return self.extra_gn_options
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_linux_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,b
esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only]
genio-lighting-app
linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-coverage][-dmalloc][-clang]
linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,python-bindings,tv-app,tv-casting-app,bridge,dynamic-bridge,tests,chip-cert,address-resolve-tool,contact-sensor}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui]
linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,dynamic-bridge,tests,chip-cert,address-resolve-tool,contact-sensor}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui]
linux-x64-efr32-test-runner[-clang]
imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release]
infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage]
Expand Down

0 comments on commit 47bf1fa

Please sign in to comment.