Skip to content

Commit

Permalink
Merge branch 'master' into darwin_attestation_challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
mburshteyn1 authored Aug 29, 2022
2 parents a8907e1 + b90a934 commit f11e245
Show file tree
Hide file tree
Showing 16 changed files with 346 additions and 115 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-esp32:0.5.91
image: connectedhomeip/chip-build-esp32:0.5.96
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-esp32:0.5.91
image: connectedhomeip/chip-build-esp32:0.5.96
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
8 changes: 1 addition & 7 deletions config/tizen/chip-gn/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ if (chip_enable_wifi) {
pkg_config("capi-network-wifi-manager") {
packages = [ "capi-network-wifi-manager" ]
}
pkg_config("capi-network-softap") {
packages = [ "capi-network-softap" ]
}
}

if (chip_enable_ble) {
Expand All @@ -74,10 +71,7 @@ source_set("tizen") {
}

if (chip_enable_wifi) {
public_configs += [
":capi-network-wifi-manager",
":capi-network-softap",
]
public_configs += [ ":capi-network-wifi-manager" ]
}

if (chip_enable_ble) {
Expand Down
3 changes: 2 additions & 1 deletion examples/chip-tool/commands/clusters/SubscriptionsCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class ShutdownSubscription : public CHIPCommand
{
public:
ShutdownSubscription(CredentialIssuerCommands * credsIssuerConfig) :
CHIPCommand("shutdown-one", credsIssuerConfig, "Shut down a single subscription, identified by its subscription id.")
CHIPCommand("shutdown-one", credsIssuerConfig,
"Shut down a single subscription, identified by its subscription id and target node id.")
{
AddArgument("subscription-id", 0, UINT64_MAX, &mSubscriptionId);
AddArgument("node-id", 0, UINT64_MAX, &mNodeId,
Expand Down
6 changes: 3 additions & 3 deletions integrations/cloudbuild/build-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
- "--init"
- "--recursive"
id: Submodules
- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -21,14 +21,14 @@ steps:
path: /pwenv
timeout: 900s

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
- >-
./scripts/build/build_examples.py --enable-flashbundle
--target-glob '*' --skip-target-glob
'{mbed-*,tizen-*,*-tests*,*-chip-test}' build --create-archives
'{tizen-*,*-tests*,*-chip-test}' build --create-archives
/workspace/artifacts/
id: CompileAll
waitFor:
Expand Down
6 changes: 3 additions & 3 deletions integrations/cloudbuild/chef.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
steps:
- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -12,7 +12,7 @@ steps:
path: /pwenv
timeout: 900s

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -26,7 +26,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand Down
12 changes: 6 additions & 6 deletions integrations/cloudbuild/smoke-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
- "--init"
- "--recursive"
id: Submodules
- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
env:
- PW_ENVIRONMENT_ROOT=/pwenv
args:
Expand All @@ -21,7 +21,7 @@ steps:
path: /pwenv
timeout: 900s

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
id: ESP32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -37,7 +37,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
id: NRFConnect
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -54,7 +54,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
id: EFR32
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -71,7 +71,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
id: Linux
env:
- PW_ENVIRONMENT_ROOT=/pwenv
Expand All @@ -88,7 +88,7 @@ steps:
- name: pwenv
path: /pwenv

- name: "connectedhomeip/chip-build-vscode:0.5.91"
- name: "connectedhomeip/chip-build-vscode:0.5.96"
id: Android
env:
- PW_ENVIRONMENT_ROOT=/pwenv
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 @@ -336,6 +336,8 @@ def HostTargets():
yield target_native.Extend('tests-boringssl', app=HostApp.TESTS, crypto_library=HostCryptoLibrary.BORINGSSL).GlobBlacklist("Non-default test")
yield target_native.Extend('tests-coverage', app=HostApp.TESTS, use_coverage=True).GlobBlacklist("Non-default test")
yield target_native.Extend('tests-clang', app=HostApp.TESTS, use_clang=True).GlobBlacklist("Non-default test")
yield target_native.Extend('tests-clang-asan', app=HostApp.TESTS, use_clang=True, use_asan=True).GlobBlacklist("Non-default test")
yield target_native.Extend('tests-dmalloc', app=HostApp.TESTS, use_dmalloc=True).GlobBlacklist("Non-default test")

test_target = Target(HostBoard.NATIVE.PlatformName(), HostBuilder)
yield test_target.Extend(HostBoard.FAKE.BoardName() + '-tests', board=HostBoard.FAKE, app=HostApp.TESTS)
Expand Down
11 changes: 11 additions & 0 deletions scripts/build/builders/gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ def _build(self):
if self.build_command:
cmd.append(self.build_command)

extra_env = self.GnBuildEnv()
if extra_env:
# convert the command into a bash command that includes
# setting environment variables
cmd = [
'bash', '-c', '\n' + ' '.join(
['%s="%s" \\\n' % (key, value) for key, value in extra_env.items()] +
[shlex.join(cmd)]
)
]

self._Execute(cmd, title='Building ' + self.identifier)

self.PostBuildCommand()
30 changes: 17 additions & 13 deletions scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,19 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE,
separate_event_loop=True, use_libfuzzer=False, use_clang=False,
interactive_mode=True, extra_tests=False,
use_platform_mdns=False, enable_rpcs=False,
use_coverage=False, crypto_library: HostCryptoLibrary = None):
use_coverage=False, use_dmalloc=False,
crypto_library: HostCryptoLibrary = None):
super(HostBuilder, self).__init__(
root=os.path.join(root, 'examples', app.ExamplePath()),
runner=runner)

self.app = app
self.board = board
self.extra_gn_options = []
self.build_env = {}

if board == HostBoard.ARM64:
self.build_env['PKG_CONFIG_PATH'] = os.path.join(self.SysRootPath('SYSROOT_AARCH64'), 'lib/aarch64-linux-gnu/pkgconfig')

if enable_rpcs:
self.extra_gn_options.append('import("//with_pw_rpc.gni")')
Expand All @@ -244,6 +249,16 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE,
if use_asan:
self.extra_gn_options.append('is_asan=true')

if use_dmalloc:
self.extra_gn_options.append('chip_config_memory_debug_checks=true')
self.extra_gn_options.append('chip_config_memory_debug_dmalloc=true')

# this is from `dmalloc -b -l DMALLOC_LOG -i 1 high`
self.build_env['DMALLOC_OPTIONS'] = 'debug=0x4f4ed03,inter=1,log=DMALLOC_LOG'

# glib interop with dmalloc
self.build_env['G_SLICE'] = 'always-malloc'

if not separate_event_loop:
self.extra_gn_options.append('config_use_separate_eventloop=false')

Expand Down Expand Up @@ -327,18 +342,7 @@ def GnBuildArgs(self):
raise Exception('Unknown host board type: %r' % self)

def GnBuildEnv(self):
if self.board == HostBoard.NATIVE:
return None
elif self.board == HostBoard.FAKE:
return None
elif self.board == HostBoard.ARM64:
return {
'PKG_CONFIG_PATH': os.path.join(
self.SysRootPath('SYSROOT_AARCH64'),
'lib/aarch64-linux-gnu/pkgconfig'),
}
else:
raise Exception('Unknown host board type: %r' % self)
return self.build_env

def SysRootPath(self, name):
if name not in os.environ:
Expand Down
Loading

0 comments on commit f11e245

Please sign in to comment.