Skip to content

Commit edab4fb

Browse files
authored
Merge branch 'master' into window-app-demo
2 parents 62c6d14 + 5cd8726 commit edab4fb

File tree

88 files changed

+1618
-793
lines changed

Some content is hidden

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

88 files changed

+1618
-793
lines changed

.flake8

-36
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ exclude = third_party
1212
src/test_driver/mbed/*
1313
src/test_driver/linux-cirque/*
1414
src/test_driver/esp32/*
15-
src/test_driver/efr32/*
1615
build/chip/java/tests/*
1716
build/chip/linux/*
1817
build/config/linux/*
@@ -23,30 +22,25 @@ exclude = third_party
2322
examples/common/pigweed/rpc_console/py/chip_rpc/console.py
2423
examples/lighting-app/python/lighting.py
2524
examples/platform/mbed/ota/generate_ota_list_image.py
26-
examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py
2725
scripts/build/build/target.py
2826
scripts/build/build/targets.py
2927
scripts/build/builders/android.py
3028
scripts/build/builders/bouffalolab.py
3129
scripts/build/builders/cc13x2x7_26x2x7.py
32-
scripts/build/builders/efr32.py
3330
scripts/build/builders/esp32.py
3431
scripts/build/builders/genio.py
3532
scripts/build/builders/gn.py
3633
scripts/build/builders/imx.py
3734
scripts/build/builders/infineon.py
3835
scripts/build/builders/nrf.py
39-
scripts/build/test.py
4036
scripts/codegen.py
4137
scripts/codepregen.py
4238
scripts/error_table.py
4339
scripts/examples/gn_to_cmakelists.py
44-
scripts/examples/tests/test.py
4540
scripts/flashing/bouffalolab_firmware_utils.py
4641
scripts/flashing/cyw30739_firmware_utils.py
4742
scripts/flashing/nrfconnect_firmware_utils.py
4843
scripts/gen_chip_version.py
49-
scripts/gen_test_driver.py
5044
scripts/helpers/bloat_check.py
5145
scripts/pregenerate/using_codegen.py
5246
scripts/pregenerate/using_zap.py
@@ -63,16 +57,7 @@ exclude = third_party
6357
scripts/py_matter_yamltests/test_yaml_parser.py
6458
scripts/run-clang-tidy-on-compile-commands.py
6559
scripts/setup/nrfconnect/update_ncs.py
66-
scripts/tests/chiptest/__init__.py
67-
scripts/tests/chiptest/runner.py
68-
scripts/tests/chiptest/test_definition.py
6960
scripts/tests/chiptest/yamltest_with_chip_repl_tester.py
70-
scripts/tests/java/base.py
71-
scripts/tests/java/commissioning_test.py
72-
scripts/tests/java/discover_test.py
73-
scripts/tests/run_java_test.py
74-
scripts/tests/run_python_test.py
75-
scripts/tests/run_test_suite.py
7661
scripts/tools/check_zcl_file_sync.py
7762
scripts/tools/convert_ini.py
7863
scripts/tools/generate_esp32_chip_factory_bin.py
@@ -81,19 +66,14 @@ exclude = third_party
8166
scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py
8267
scripts/tools/nrfconnect/nrfconnect_generate_partition.py
8368
scripts/tools/nrfconnect/tests/test_generate_factory_data.py
84-
scripts/tools/nxp/factory_data_generator/custom.py
85-
scripts/tools/nxp/factory_data_generator/default.py
86-
scripts/tools/nxp/factory_data_generator/generate.py
8769
scripts/tools/silabs/FactoryDataProvider.py
8870
scripts/tools/telink/mfg_tool.py
8971
scripts/tools/zap/generate.py
9072
scripts/tools/zap/prune_outputs.py
91-
scripts/tools/zap/test_generate.py
9273
scripts/tools/zap/version_update.py
9374
scripts/tools/zap/zap_download.py
9475
scripts/tools/zap_convert_all.py
9576
src/app/ota_image_tool.py
96-
src/app/tests/suites/certification/information.py
9777
src/app/zap_cluster_list.py
9878
src/controller/python/build-chip-wheel.py
9979
src/controller/python/chip-device-ctrl.py
@@ -123,23 +103,7 @@ exclude = third_party
123103
src/controller/python/chip/yaml/__init__.py
124104
src/controller/python/chip/yaml/format_converter.py
125105
src/controller/python/chip/yaml/runner.py
126-
src/controller/python/test/test_scripts/base.py
127-
src/controller/python/test/test_scripts/cluster_objects.py
128-
src/controller/python/test/test_scripts/mobile-device-test.py
129-
src/controller/python/test/test_scripts/network_commissioning.py
130-
src/controller/python/test/unit_tests/test_cluster_objects.py
131-
src/controller/python/test/unit_tests/test_tlv.py
132106
src/lib/asn1/gen_asn1oid.py
133107
src/pybindings/pycontroller/build-chip-wheel.py
134108
src/pybindings/pycontroller/pychip/__init__.py
135-
src/python_testing/TC_ACE_1_3.py
136-
src/python_testing/TC_ACE_1_4.py
137-
src/python_testing/TC_CGEN_2_4.py
138-
src/python_testing/TC_DA_1_7.py
139-
src/python_testing/TC_RR_1_1.py
140-
src/python_testing/TC_SC_3_6.py
141-
src/python_testing/TC_TestEventTrigger.py
142-
src/python_testing/hello_test.py
143-
src/python_testing/matter_testing_support.py
144109
src/setup_payload/python/generate_setup_payload.py
145-
src/setup_payload/tests/run_python_setup_payload_gen_test.py

.github/workflows/qemu.yaml

+45-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ env:
2727
CHIP_NO_LOG_TIMESTAMPS: true
2828

2929
jobs:
30-
qemu:
30+
31+
qemu-esp32:
3132
name: ESP32
3233
timeout-minutes: 85
3334

@@ -94,3 +95,46 @@ jobs:
9495
with:
9596
name: qemu-esp32-logs
9697
path: /tmp/log_output
98+
99+
qemu-tizen:
100+
name: Tizen
101+
102+
runs-on: ubuntu-latest
103+
if: github.actor != 'restyled-io[bot]'
104+
105+
container:
106+
image: connectedhomeip/chip-build-tizen-qemu:0.6.39
107+
volumes:
108+
- "/tmp/log_output:/tmp/test_logs"
109+
110+
steps:
111+
- uses: Wandalen/wretry.action@v1.0.36
112+
name: Checkout
113+
with:
114+
action: actions/checkout@v3
115+
with: |
116+
token: ${{ github.token }}
117+
attempt_limit: 3
118+
attempt_delay: 2000
119+
- name: Checkout submodules
120+
run: scripts/checkout_submodules.py --shallow --platform tizen
121+
122+
- name: Bootstrap cache
123+
uses: actions/cache@v3
124+
timeout-minutes: 10
125+
with:
126+
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
127+
path: |
128+
.environment
129+
build_overrides/pigweed_environment.gni
130+
- name: Bootstrap
131+
timeout-minutes: 25
132+
run: scripts/build/gn_bootstrap.sh
133+
134+
- name: Build and run tests
135+
run: |
136+
./scripts/run_in_build_env.sh \
137+
"./scripts/build/build_examples.py \
138+
--target tizen-arm-tests-no-ble \
139+
build
140+
"

BUILD.gn

+11-1
Original file line numberDiff line numberDiff line change
@@ -668,12 +668,21 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
668668

669669
if (enable_tizen_lighting_app) {
670670
group("tizen_lighting_app") {
671-
deps = [ "${chip_root}/examples/lighting-app/tizen/(${chip_root}/build/toolchain/tizen:tizen_arm)" ]
671+
deps = [ "${chip_root}/examples/lighting-app/tizen(${chip_root}/build/toolchain/tizen:tizen_arm)" ]
672672
}
673673

674674
extra_build_deps += [ ":tizen_lighting_app" ]
675675
}
676676

677+
if (enable_tizen_builds) {
678+
group("check:tizen") {
679+
testonly = true
680+
deps = [ "${chip_root}/src/test_driver/tizen/integration-tests:check" ]
681+
}
682+
683+
extra_check_deps += [ ":check:tizen" ]
684+
}
685+
677686
if (enable_mw320_shell_build) {
678687
group("mw320_shell") {
679688
deps = [ "${chip_root}/examples/shell/mw320(${chip_root}/config/mw320/toolchain:mw320_shell)" ]
@@ -703,6 +712,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
703712
}
704713

705714
group("check") {
715+
testonly = true
706716
deps = extra_check_deps
707717
foreach(_build, builds) {
708718
deps += [ get_label_info(_build, "dir") + ":check_" +

build/chip/java/tests/test.py

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import json
2020
import os
21-
import subprocess
2221
import unittest
2322
from os import path
2423

build/config/tizen/config.gni

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
# limitations under the License.
1414

1515
declare_args() {
16-
# Location of The Tizen sysroot
17-
tizen_sdk_sysroot = ""
16+
# Location of Tizen SDK
17+
tizen_sdk_root = getenv("TIZEN_SDK_ROOT")
1818

19-
# Location of the Tizen SDK.
20-
tizen_sdk_root = ""
19+
# Location of Tizen SDK sysroot
20+
tizen_sdk_sysroot = getenv("TIZEN_SDK_SYSROOT")
2121
}

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

+14-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import android.view.ViewGroup
99
import android.widget.Button
1010
import android.widget.EditText
1111
import android.widget.Spinner
12+
import android.widget.TextView
1213
import androidx.fragment.app.Fragment
1314
import androidx.lifecycle.lifecycleScope
1415
import chip.devicecontroller.ChipDeviceController
@@ -114,7 +115,7 @@ class WildcardFragment : Fragment() {
114115
return stringBuilder.toString()
115116
}
116117

117-
private suspend fun subscribe(type: Int, minInterval: Int, maxInterval: Int, keepSubscriptions: Boolean, isFabricFiltered: Boolean) {
118+
private suspend fun subscribe(type: Int, minInterval: Int, maxInterval: Int, keepSubscriptions: Boolean, isFabricFiltered: Boolean, isUrgent: Boolean) {
118119
val subscriptionEstablishedCallback =
119120
SubscriptionEstablishedCallback { Log.i(TAG, "Subscription to device established") }
120121

@@ -141,7 +142,7 @@ class WildcardFragment : Fragment() {
141142
keepSubscriptions,
142143
isFabricFiltered)
143144
} else if (type == EVENT) {
144-
val eventPath = ChipEventPath.newInstance(endpointId, clusterId, eventId)
145+
val eventPath = ChipEventPath.newInstance(endpointId, clusterId, eventId, isUrgent)
145146
deviceController.subscribeToPath(subscriptionEstablishedCallback,
146147
resubscriptionAttemptCallback,
147148
reportCallback,
@@ -199,6 +200,15 @@ class WildcardFragment : Fragment() {
199200

200201
private fun showSubscribeDialog(type: Int) {
201202
val dialogView = requireActivity().layoutInflater.inflate(R.layout.subscribe_dialog, null)
203+
val isUrgentTv = dialogView.findViewById<TextView>(R.id.titleisUrgent)
204+
val isUrgentSp = dialogView.findViewById<Spinner>(R.id.isUrgentSp)
205+
if (type == EVENT) {
206+
isUrgentTv.visibility = View.VISIBLE
207+
isUrgentSp.visibility = View.VISIBLE
208+
} else {
209+
isUrgentTv.visibility = View.GONE
210+
isUrgentSp.visibility = View.GONE
211+
}
202212
val dialog = AlertDialog.Builder(requireContext()).apply {
203213
setView(dialogView)
204214
}.create()
@@ -215,7 +225,8 @@ class WildcardFragment : Fragment() {
215225
minIntervalEd.text.toString().toInt(),
216226
maxIntervalEd.text.toString().toInt(),
217227
keepSubscriptionsSp.selectedItem.toString().toBoolean(),
218-
isFabricFilteredSp.selectedItem.toString().toBoolean()
228+
isFabricFilteredSp.selectedItem.toString().toBoolean(),
229+
isUrgentSp.selectedItem.toString().toBoolean(),
219230
)
220231
} else {
221232
Log.e(TAG, "minInterval or maxInterval is empty!" )

examples/android/CHIPTool/app/src/main/res/layout/subscribe_dialog.xml

+23-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,28 @@
3434
android:layout_marginBottom="8dp"
3535
app:layout_constraintStart_toStartOf="parent"
3636
app:layout_constraintTop_toBottomOf="@id/minIntervalEd" />
37+
<TextView
38+
android:id="@+id/titleisUrgent"
39+
android:layout_width="match_parent"
40+
android:layout_height="wrap_content"
41+
android:text="@string/subscribe_dialog_is_urgent_hint"
42+
android:textSize="16sp"
43+
android:layout_marginTop="8dp"
44+
app:layout_constraintStart_toStartOf="parent"
45+
app:layout_constraintTop_toBottomOf="@id/maxIntervalEd"
46+
/>
47+
<Spinner
48+
android:id="@+id/isUrgentSp"
49+
android:layout_width="wrap_content"
50+
android:layout_height="wrap_content"
51+
android:hint="@string/subscribe_dialog_is_urgent_hint"
52+
android:entries="@array/chip_select_menu"
53+
android:inputType="text"
54+
android:spinnerMode="dropdown"
55+
android:textSize="16sp"
56+
android:layout_marginTop="8dp"
57+
app:layout_constraintStart_toStartOf="parent"
58+
app:layout_constraintTop_toBottomOf="@id/titleisUrgent" />
3759
<TextView
3860
android:id="@+id/titleKeepSubscriptions"
3961
android:layout_width="match_parent"
@@ -42,7 +64,7 @@
4264
android:textSize="16sp"
4365
android:layout_marginTop="8dp"
4466
app:layout_constraintStart_toStartOf="parent"
45-
app:layout_constraintTop_toBottomOf="@id/maxIntervalEd"
67+
app:layout_constraintTop_toBottomOf="@id/isUrgentSp"
4668
/>
4769
<Spinner
4870
android:id="@+id/keepSubscriptionsSp"
@@ -56,7 +78,6 @@
5678
android:layout_marginTop="8dp"
5779
app:layout_constraintStart_toStartOf="parent"
5880
app:layout_constraintTop_toBottomOf="@id/titleKeepSubscriptions" />
59-
6081
<TextView
6182
android:id="@+id/titleIsFabricFilter"
6283
android:layout_width="match_parent"

examples/android/CHIPTool/app/src/main/res/values/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
<string name="subscribe_dialog_subscribe_btn_text">Subscribe</string>
143143
<string name="subscribe_dialog_min_interval_hint">Minimum interval (seconds)</string>
144144
<string name="subscribe_dialog_max_interval_hint">Maximum interval (seconds)</string>
145+
<string name="subscribe_dialog_is_urgent_hint">is Urgent Event (bool)</string>
145146
<string name="subscribe_dialog_keep_subscriptions_hint">keep subscriptions (bool)</string>
146147
<string name="subscribe_dialog_is_fabric_filtered_hint">is Fabric Filtered (bool)</string>
147148

examples/chef/linux/with_pw_rpc.gni

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
3232
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
3333
pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
3434
pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
35+
pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
36+
pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"
3537

3638
pw_build_LINK_DEPS = [
3739
"$dir_pw_assert:impl",

examples/dynamic-bridge-app/linux/with_pw_rpc.gni

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
3232
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
3333
pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
3434
pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
35+
pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
36+
pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"
3537

3638
pw_build_LINK_DEPS = [
3739
"$dir_pw_assert:impl",

examples/lighting-app/linux/with_pw_rpc.gni

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
3232
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
3333
pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
3434
pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
35+
pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
36+
pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"
3537

3638
pw_build_LINK_DEPS = [
3739
"$dir_pw_assert:impl",

examples/placeholder/linux/BUILD.gn

+1-12
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,10 @@
1515
import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
1717

18-
import("${chip_root}/src/app/chip_data_model.gni")
19-
2018
declare_args() {
2119
chip_tests_zap_config = "none"
2220
}
2321

24-
chip_data_model("configuration") {
25-
zap_file = "apps/${chip_tests_zap_config}/config.zap"
26-
27-
zap_pregenerated_dir = "${chip_root}/zzz_generated/placeholder/${chip_tests_zap_config}/zap-generated"
28-
is_server = true
29-
}
30-
3122
config("includes") {
3223
include_dirs = [
3324
".",
@@ -41,13 +32,11 @@ executable("chip-${chip_tests_zap_config}") {
4132
"AppOptions.cpp",
4233
"InteractiveServer.cpp",
4334
"main.cpp",
44-
"src/bridged-actions-stub.cpp",
45-
"static-supported-modes-manager.cpp",
4635
]
4736

4837
deps = [
49-
":configuration",
5038
"${chip_root}/examples/common/websocket-server",
39+
"${chip_root}/examples/placeholder/linux/apps/${chip_tests_zap_config}:${chip_tests_zap_config}",
5140
"${chip_root}/examples/platform/linux:app-main",
5241
"${chip_root}/src/app/tests/suites/commands/delay",
5342
"${chip_root}/src/app/tests/suites/commands/discovery",

0 commit comments

Comments
 (0)