Skip to content

Commit

Permalink
Merge branch 'master' into window-app-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 authored Feb 28, 2023
2 parents 62c6d14 + 5cd8726 commit edab4fb
Show file tree
Hide file tree
Showing 88 changed files with 1,618 additions and 793 deletions.
36 changes: 0 additions & 36 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ exclude = third_party
src/test_driver/mbed/*
src/test_driver/linux-cirque/*
src/test_driver/esp32/*
src/test_driver/efr32/*
build/chip/java/tests/*
build/chip/linux/*
build/config/linux/*
Expand All @@ -23,30 +22,25 @@ exclude = third_party
examples/common/pigweed/rpc_console/py/chip_rpc/console.py
examples/lighting-app/python/lighting.py
examples/platform/mbed/ota/generate_ota_list_image.py
examples/platform/nxp/k32w/k32w0/scripts/detokenizer.py
scripts/build/build/target.py
scripts/build/build/targets.py
scripts/build/builders/android.py
scripts/build/builders/bouffalolab.py
scripts/build/builders/cc13x2x7_26x2x7.py
scripts/build/builders/efr32.py
scripts/build/builders/esp32.py
scripts/build/builders/genio.py
scripts/build/builders/gn.py
scripts/build/builders/imx.py
scripts/build/builders/infineon.py
scripts/build/builders/nrf.py
scripts/build/test.py
scripts/codegen.py
scripts/codepregen.py
scripts/error_table.py
scripts/examples/gn_to_cmakelists.py
scripts/examples/tests/test.py
scripts/flashing/bouffalolab_firmware_utils.py
scripts/flashing/cyw30739_firmware_utils.py
scripts/flashing/nrfconnect_firmware_utils.py
scripts/gen_chip_version.py
scripts/gen_test_driver.py
scripts/helpers/bloat_check.py
scripts/pregenerate/using_codegen.py
scripts/pregenerate/using_zap.py
Expand All @@ -63,16 +57,7 @@ exclude = third_party
scripts/py_matter_yamltests/test_yaml_parser.py
scripts/run-clang-tidy-on-compile-commands.py
scripts/setup/nrfconnect/update_ncs.py
scripts/tests/chiptest/__init__.py
scripts/tests/chiptest/runner.py
scripts/tests/chiptest/test_definition.py
scripts/tests/chiptest/yamltest_with_chip_repl_tester.py
scripts/tests/java/base.py
scripts/tests/java/commissioning_test.py
scripts/tests/java/discover_test.py
scripts/tests/run_java_test.py
scripts/tests/run_python_test.py
scripts/tests/run_test_suite.py
scripts/tools/check_zcl_file_sync.py
scripts/tools/convert_ini.py
scripts/tools/generate_esp32_chip_factory_bin.py
Expand All @@ -81,19 +66,14 @@ exclude = third_party
scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py
scripts/tools/nrfconnect/nrfconnect_generate_partition.py
scripts/tools/nrfconnect/tests/test_generate_factory_data.py
scripts/tools/nxp/factory_data_generator/custom.py
scripts/tools/nxp/factory_data_generator/default.py
scripts/tools/nxp/factory_data_generator/generate.py
scripts/tools/silabs/FactoryDataProvider.py
scripts/tools/telink/mfg_tool.py
scripts/tools/zap/generate.py
scripts/tools/zap/prune_outputs.py
scripts/tools/zap/test_generate.py
scripts/tools/zap/version_update.py
scripts/tools/zap/zap_download.py
scripts/tools/zap_convert_all.py
src/app/ota_image_tool.py
src/app/tests/suites/certification/information.py
src/app/zap_cluster_list.py
src/controller/python/build-chip-wheel.py
src/controller/python/chip-device-ctrl.py
Expand Down Expand Up @@ -123,23 +103,7 @@ exclude = third_party
src/controller/python/chip/yaml/__init__.py
src/controller/python/chip/yaml/format_converter.py
src/controller/python/chip/yaml/runner.py
src/controller/python/test/test_scripts/base.py
src/controller/python/test/test_scripts/cluster_objects.py
src/controller/python/test/test_scripts/mobile-device-test.py
src/controller/python/test/test_scripts/network_commissioning.py
src/controller/python/test/unit_tests/test_cluster_objects.py
src/controller/python/test/unit_tests/test_tlv.py
src/lib/asn1/gen_asn1oid.py
src/pybindings/pycontroller/build-chip-wheel.py
src/pybindings/pycontroller/pychip/__init__.py
src/python_testing/TC_ACE_1_3.py
src/python_testing/TC_ACE_1_4.py
src/python_testing/TC_CGEN_2_4.py
src/python_testing/TC_DA_1_7.py
src/python_testing/TC_RR_1_1.py
src/python_testing/TC_SC_3_6.py
src/python_testing/TC_TestEventTrigger.py
src/python_testing/hello_test.py
src/python_testing/matter_testing_support.py
src/setup_payload/python/generate_setup_payload.py
src/setup_payload/tests/run_python_setup_payload_gen_test.py
46 changes: 45 additions & 1 deletion .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
qemu:

qemu-esp32:
name: ESP32
timeout-minutes: 85

Expand Down Expand Up @@ -94,3 +95,46 @@ jobs:
with:
name: qemu-esp32-logs
path: /tmp/log_output

qemu-tizen:
name: Tizen

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-tizen-qemu:0.6.39
volumes:
- "/tmp/log_output:/tmp/test_logs"

steps:
- uses: Wandalen/wretry.action@v1.0.36
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform tizen

- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 25
run: scripts/build/gn_bootstrap.sh

- name: Build and run tests
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target tizen-arm-tests-no-ble \
build
"
12 changes: 11 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,21 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

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

extra_build_deps += [ ":tizen_lighting_app" ]
}

if (enable_tizen_builds) {
group("check:tizen") {
testonly = true
deps = [ "${chip_root}/src/test_driver/tizen/integration-tests:check" ]
}

extra_check_deps += [ ":check:tizen" ]
}

if (enable_mw320_shell_build) {
group("mw320_shell") {
deps = [ "${chip_root}/examples/shell/mw320(${chip_root}/config/mw320/toolchain:mw320_shell)" ]
Expand Down Expand Up @@ -703,6 +712,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
}

group("check") {
testonly = true
deps = extra_check_deps
foreach(_build, builds) {
deps += [ get_label_info(_build, "dir") + ":check_" +
Expand Down
1 change: 0 additions & 1 deletion build/chip/java/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import json
import os
import subprocess
import unittest
from os import path

Expand Down
8 changes: 4 additions & 4 deletions build/config/tizen/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# limitations under the License.

declare_args() {
# Location of The Tizen sysroot
tizen_sdk_sysroot = ""
# Location of Tizen SDK
tizen_sdk_root = getenv("TIZEN_SDK_ROOT")

# Location of the Tizen SDK.
tizen_sdk_root = ""
# Location of Tizen SDK sysroot
tizen_sdk_sysroot = getenv("TIZEN_SDK_SYSROOT")
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import android.view.ViewGroup
import android.widget.Button
import android.widget.EditText
import android.widget.Spinner
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.lifecycle.lifecycleScope
import chip.devicecontroller.ChipDeviceController
Expand Down Expand Up @@ -114,7 +115,7 @@ class WildcardFragment : Fragment() {
return stringBuilder.toString()
}

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

Expand All @@ -141,7 +142,7 @@ class WildcardFragment : Fragment() {
keepSubscriptions,
isFabricFiltered)
} else if (type == EVENT) {
val eventPath = ChipEventPath.newInstance(endpointId, clusterId, eventId)
val eventPath = ChipEventPath.newInstance(endpointId, clusterId, eventId, isUrgent)
deviceController.subscribeToPath(subscriptionEstablishedCallback,
resubscriptionAttemptCallback,
reportCallback,
Expand Down Expand Up @@ -199,6 +200,15 @@ class WildcardFragment : Fragment() {

private fun showSubscribeDialog(type: Int) {
val dialogView = requireActivity().layoutInflater.inflate(R.layout.subscribe_dialog, null)
val isUrgentTv = dialogView.findViewById<TextView>(R.id.titleisUrgent)
val isUrgentSp = dialogView.findViewById<Spinner>(R.id.isUrgentSp)
if (type == EVENT) {
isUrgentTv.visibility = View.VISIBLE
isUrgentSp.visibility = View.VISIBLE
} else {
isUrgentTv.visibility = View.GONE
isUrgentSp.visibility = View.GONE
}
val dialog = AlertDialog.Builder(requireContext()).apply {
setView(dialogView)
}.create()
Expand All @@ -215,7 +225,8 @@ class WildcardFragment : Fragment() {
minIntervalEd.text.toString().toInt(),
maxIntervalEd.text.toString().toInt(),
keepSubscriptionsSp.selectedItem.toString().toBoolean(),
isFabricFilteredSp.selectedItem.toString().toBoolean()
isFabricFilteredSp.selectedItem.toString().toBoolean(),
isUrgentSp.selectedItem.toString().toBoolean(),
)
} else {
Log.e(TAG, "minInterval or maxInterval is empty!" )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,28 @@
android:layout_marginBottom="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/minIntervalEd" />
<TextView
android:id="@+id/titleisUrgent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/subscribe_dialog_is_urgent_hint"
android:textSize="16sp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/maxIntervalEd"
/>
<Spinner
android:id="@+id/isUrgentSp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/subscribe_dialog_is_urgent_hint"
android:entries="@array/chip_select_menu"
android:inputType="text"
android:spinnerMode="dropdown"
android:textSize="16sp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleisUrgent" />
<TextView
android:id="@+id/titleKeepSubscriptions"
android:layout_width="match_parent"
Expand All @@ -42,7 +64,7 @@
android:textSize="16sp"
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/maxIntervalEd"
app:layout_constraintTop_toBottomOf="@id/isUrgentSp"
/>
<Spinner
android:id="@+id/keepSubscriptionsSp"
Expand All @@ -56,7 +78,6 @@
android:layout_marginTop="8dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/titleKeepSubscriptions" />

<TextView
android:id="@+id/titleIsFabricFilter"
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<string name="subscribe_dialog_subscribe_btn_text">Subscribe</string>
<string name="subscribe_dialog_min_interval_hint">Minimum interval (seconds)</string>
<string name="subscribe_dialog_max_interval_hint">Maximum interval (seconds)</string>
<string name="subscribe_dialog_is_urgent_hint">is Urgent Event (bool)</string>
<string name="subscribe_dialog_keep_subscriptions_hint">keep subscriptions (bool)</string>
<string name="subscribe_dialog_is_fabric_filtered_hint">is Fabric Filtered (bool)</string>

Expand Down
2 changes: 2 additions & 0 deletions examples/chef/linux/with_pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
2 changes: 2 additions & 0 deletions examples/dynamic-bridge-app/linux/with_pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
2 changes: 2 additions & 0 deletions examples/lighting-app/linux/with_pw_rpc.gni
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc"
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock"
pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend"
pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield"
pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep"

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
Expand Down
13 changes: 1 addition & 12 deletions examples/placeholder/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,10 @@
import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("${chip_root}/src/app/chip_data_model.gni")

declare_args() {
chip_tests_zap_config = "none"
}

chip_data_model("configuration") {
zap_file = "apps/${chip_tests_zap_config}/config.zap"

zap_pregenerated_dir = "${chip_root}/zzz_generated/placeholder/${chip_tests_zap_config}/zap-generated"
is_server = true
}

config("includes") {
include_dirs = [
".",
Expand All @@ -41,13 +32,11 @@ executable("chip-${chip_tests_zap_config}") {
"AppOptions.cpp",
"InteractiveServer.cpp",
"main.cpp",
"src/bridged-actions-stub.cpp",
"static-supported-modes-manager.cpp",
]

deps = [
":configuration",
"${chip_root}/examples/common/websocket-server",
"${chip_root}/examples/placeholder/linux/apps/${chip_tests_zap_config}:${chip_tests_zap_config}",
"${chip_root}/examples/platform/linux:app-main",
"${chip_root}/src/app/tests/suites/commands/delay",
"${chip_root}/src/app/tests/suites/commands/discovery",
Expand Down
Loading

0 comments on commit edab4fb

Please sign in to comment.