Skip to content

Commit 0665c32

Browse files
authored
Merge branch 'master' into update_attribute_persistence
2 parents f6fbf6f + b0fd385 commit 0665c32

File tree

106 files changed

+2263
-802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+2263
-802
lines changed

.github/workflows/java-tests.yaml

+27-12
Original file line numberDiff line numberDiff line change
@@ -207,18 +207,19 @@ jobs:
207207
--tool-args "already-discovered --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \
208208
--factoryreset \
209209
'
210-
# Disabled due to failure: https://github.com/project-chip/connectedhomeip/issues/27361
211-
# - name: Run Pairing Address-PaseOnly Test
212-
# run: |
213-
# scripts/run_in_python_env.sh out/venv \
214-
# './scripts/tests/run_java_test.py \
215-
# --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
216-
# --app-args "--discriminator 3840 --interface-id -1" \
217-
# --tool-path out/linux-x64-java-matter-controller \
218-
# --tool-cluster "pairing" \
219-
# --tool-args "address-paseonly --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \
220-
# --factoryreset \
221-
# '
210+
- name: Run Pairing Address-PaseOnly Test
211+
# Disabled due to failure: https://github.com/project-chip/connectedhomeip/issues/27361
212+
if: false
213+
run: |
214+
scripts/run_in_python_env.sh out/venv \
215+
'./scripts/tests/run_java_test.py \
216+
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
217+
--app-args "--discriminator 3840 --interface-id -1" \
218+
--tool-path out/linux-x64-java-matter-controller \
219+
--tool-cluster "pairing" \
220+
--tool-args "address-paseonly --nodeid 1 --setup-pin-code 20202021 --address ::1 --port 5540 -t 1000" \
221+
--factoryreset \
222+
'
222223
- name: Run Pairing SetupQRCode Test
223224
# Generally completes in seconds
224225
timeout-minutes: 2
@@ -258,6 +259,20 @@ jobs:
258259
--tool-args "onnetwork-long --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 1000" \
259260
--factoryreset \
260261
'
262+
- name: Run Pairing Onnetwork and get diagnostic log Test
263+
# TODO: test below is disabled because it seems flaky (crashes on pool not being empty on app exit)
264+
# See: https://github.com/project-chip/connectedhomeip/issues/36734
265+
if: false
266+
run: |
267+
scripts/run_in_python_env.sh out/venv \
268+
'./scripts/tests/run_java_test.py \
269+
--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app \
270+
--app-args "--discriminator 3840 --interface-id -1 --crash_log ./crashLog.log --end_user_support_log ./enduser.log --network_diagnostics_log ./network.log" \
271+
--tool-path out/linux-x64-java-matter-controller \
272+
--tool-cluster "bdx" \
273+
--tool-args "onnetwork-long-downloadLog --nodeid 1 --setup-pin-code 20202021 --discriminator 3840 -t 3000 --logType CrashLogs --fileName ./crashLog.log" \
274+
--factoryreset \
275+
'
261276
- name: Run Pairing Onnetwork Test
262277
# Generally completes in seconds
263278
timeout-minutes: 2

docs/testing/fuzz_testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@ for an example of a simple fuzz test.
7979
- Another example:
8080
[src/setup_payload/tests/BUILD.gn](https://github.com/project-chip/connectedhomeip/blob/b367512f519e5e109346e81a0d84fd85cd9192f7/src/setup_payload/tests/BUILD.gn#L43)
8181
82-
- Add to `src/BUILD.gn`
82+
- Add to `${chip_root}/BUILD.gn`
8383
8484
- Add the Fuzzing Target in this part of the code :
85-
[src/BUILD.gn](https://github.com/project-chip/connectedhomeip/blob/b367512f519e5e109346e81a0d84fd85cd9192f7/BUILD.gn#L52)
85+
[\${chip_root}/BUILD.gn](https://github.com/project-chip/connectedhomeip/blob/b367512f519e5e109346e81a0d84fd85cd9192f7/BUILD.gn#L52)
8686
8787
- Add Fuzzing Target like that
8888

docs/testing/python.md

+17-12
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Each `Clusters.<ClusterName>.Structs.<StructName>` has:
217217

218218
Example:
219219

220-
```
220+
```python
221221
Clusters.BasicInformation.Structs.ProductAppearanceStruct(
222222
finish=Clusters.BasicInformation.Enums.ProductFinishEnum.kFabric,
223223
primaryColor=Clusters.BasicInformation.Enums.ColorEnum.kBlack)
@@ -293,7 +293,7 @@ Multi-path
293293

294294
Example:
295295

296-
```
296+
```python
297297
urgent = 1
298298

299299
await dev_ctrl ReadEvent(node_id, [(1,
@@ -359,7 +359,7 @@ asserts.assert_equal(ret[0].status, Status.Success, “write failed”)
359359

360360
Example:
361361

362-
```
362+
```python
363363
pai = await dev_ctrl.SendCommand(nodeid, 0, Clusters.OperationalCredentials.Commands.CertificateChainRequest(2))
364364
```
365365

@@ -387,7 +387,7 @@ class provides some helpers for Mobly integration.
387387

388388
use as:
389389

390-
```
390+
```python
391391
if __name__ == "__main__":
392392
default_matter_test_main()
393393
```
@@ -479,7 +479,7 @@ See
479479

480480
To create a controller on a new fabric:
481481

482-
```
482+
```python
483483
new_CA = self.certificate_authority_manager.NewCertificateAuthority()
484484

485485
new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1,
@@ -490,7 +490,7 @@ TH2 = new_fabric_admin.NewController(nodeId=112233)
490490

491491
Open a commissioning window (ECW):
492492

493-
```
493+
```python
494494
params = self.OpenCommissioningWindow(dev_ctrl=self.default_controller, node_id=self.dut_node_id)
495495
```
496496

@@ -499,7 +499,7 @@ the fabric admin.
499499

500500
Fabric admin for default controller:
501501

502-
```
502+
```python
503503
fa = self.certificate_authority_manager.activeCaList[0].adminList[0]
504504
second_ctrl = fa.new_fabric_admin.NewController(nodeId=node_id)
505505
```
@@ -577,13 +577,13 @@ running. To compile and install the wheel, do the following:
577577

578578
First activate the matter environment using either
579579

580-
```
580+
```shell
581581
. ./scripts/bootstrap.sh
582582
```
583583

584584
or
585585

586-
```
586+
```shell
587587
. ./scripts/activate.sh
588588
```
589589

@@ -592,7 +592,7 @@ subsequent setups as it is faster.
592592

593593
Next build the python wheels and create / activate a venv
594594

595-
```
595+
```shell
596596
./scripts/build_python.sh -i out/python_env
597597
source out/python_env/bin/activate
598598
```
@@ -609,15 +609,15 @@ that will be commissioned either over BLE or WiFi.
609609

610610
For example, to run the TC-ACE-1.2 tests against an un-commissioned DUT:
611611

612-
```
612+
```shell
613613
python3 src/python_testing/TC_ACE_1_2.py --commissioning-method on-network --qr-code MT:-24J0AFN00KA0648G00
614614
```
615615

616616
Some tests require additional arguments (ex. PIXITs or configuration variables
617617
for the CI). These arguments can be passed as sets of key/value pairs using the
618618
`--<type>-arg:<value>` command line arguments. For example:
619619

620-
```
620+
```shell
621621
--int-arg PIXIT.ACE.APPENDPOINT:1 --int-arg PIXIT.ACE.APPDEVTYPEID:0x0100 --string-arg PIXIT.ACE.APPCLUSTER:OnOff --string-arg PIXIT.ACE.APPATTRIBUTE:OnOff
622622
```
623623

@@ -722,6 +722,11 @@ for that run, e.g.:
722722

723723
- Example: `"Manual pairing code: \\[\\d+\\]"`
724724

725+
- `app-stdin-pipe`: Specifies the path to the named pipe that the test runner
726+
might use to send input to the application.
727+
728+
- Example: `/tmp/app-fifo`
729+
725730
- `script-args`: Specifies the arguments to be passed to the test script.
726731

727732
- Example:

docs/testing/yaml.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,11 @@ or
330330
bootstrap.sh should be used for for the first setup, activate.sh may be used for
331331
subsequent setups as it is faster.
332332

333-
Next build the python wheels and create a venv (called `py` here, but any name
334-
may be used)
333+
Next build the python wheels and create a venv
335334

336335
```
337336
./scripts/build_python.sh -i out/python_env
338-
source py/bin/activate
337+
source out/python_env/bin/activate
339338
```
340339

341340
Compile chip-tool:

examples/android/CHIPTool/app/src/main/AndroidManifest.xml

+9
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@
4646
<data android:scheme="mt" android:host="modelinfo" /> <!-- Process Redirect URIs -->
4747
</intent-filter>
4848
</activity>
49+
<provider
50+
android:name="androidx.core.content.FileProvider"
51+
android:authorities="${applicationId}.provider"
52+
android:exported="false"
53+
android:grantUriPermissions="true">
54+
<meta-data
55+
android:name="android.support.FILE_PROVIDER_PATHS"
56+
android:resource="@xml/file_paths" />
57+
</provider>
4958
</application>
5059

5160
<queries>

examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/SelectActionFragment.kt

+5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class SelectActionFragment : Fragment() {
7272
binding.provisionCustomFlowBtn.setOnClickListener { handleProvisionCustomFlowClicked() }
7373
binding.wildcardBtn.setOnClickListener { handleWildcardClicked() }
7474
binding.unpairDeviceBtn.setOnClickListener { handleUnpairDeviceClicked() }
75+
binding.diagnosticLogBtn.setOnClickListener { handleDiagnosticLogClicked() }
7576
binding.groupSettingBtn.setOnClickListener { handleGroupSettingClicked() }
7677
binding.otaProviderBtn.setOnClickListener { handleOTAProviderClicked() }
7778
binding.icdBtn.setOnClickListener { handleICDClicked() }
@@ -225,6 +226,10 @@ class SelectActionFragment : Fragment() {
225226
showFragment(OtaProviderClientFragment.newInstance())
226227
}
227228

229+
private fun handleDiagnosticLogClicked() {
230+
showFragment(DiagnosticLogFragment.newInstance())
231+
}
232+
228233
/** Notifies listener of provision-WiFi-credentials button click. */
229234
private fun handleProvisionWiFiCredentialsClicked() {
230235
getCallback()?.setNetworkType(ProvisionNetworkType.WIFI)

0 commit comments

Comments
 (0)