Skip to content

Commit

Permalink
Merge branch 'master' into case-eviction-final
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjerryjohns committed Jun 16, 2022
2 parents dcf1bf5 + 3963c1b commit c978c90
Show file tree
Hide file tree
Showing 134 changed files with 21,788 additions and 20,622 deletions.
5 changes: 4 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ RUN apt-get -fy install git vim emacs sudo \
wget curl telnet \
docker.io \
iputils-ping net-tools \
libncurses5
libncurses5 \
libpython2.7

RUN groupadd -g $USER_GID $USERNAME
RUN useradd -s /bin/bash -u $USER_UID -g $USER_GID -G docker -m $USERNAME
Expand Down Expand Up @@ -83,3 +84,5 @@ RUN sed -i '/^TIZEN_SDK_DATA_PATH/d' $TIZEN_SDK_ROOT/sdk.info \
&& echo TIZEN_SDK_DATA_PATH=/home/$USERNAME/tizen-sdk-data >> $TIZEN_SDK_ROOT/sdk.info \
&& ln -sf /home/$USERNAME/.tizen-cli-config $TIZEN_SDK_ROOT/tools/.tizen-cli-config \
&& : # last line

ENV TIZEN_ROOTFS /tizen_rootfs
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"aaron-bond.better-comments",
"augustocdias.tasks-shell-input",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"editorconfig.editorconfig",
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
test_suites_linux:
name: Test Suites - Linux
timeout-minutes: 140
timeout-minutes: 145

strategy:
matrix:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 60
timeout-minutes: 65
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
retention-days: 5
test_suites_darwin:
name: Test Suites - Darwin
timeout-minutes: 140
timeout-minutes: 150

strategy:
matrix:
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 70
timeout-minutes: 80
run: |
./scripts/run_in_build_env.sh \
"./scripts/tests/run_test_suite.py \
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:
retention-days: 5
repl_tests_linux:
name: REPL Tests - Linux
timeout-minutes: 120
timeout-minutes: 130

env:
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
--copy-artifacts-to objdir-clone \
"
- name: Run Tests
timeout-minutes: 30
timeout-minutes: 40
run: |
scripts/run_in_build_env.sh './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --script-args "--log-level INFO -t 3600 --disable-test ClusterObjectTests.TestTimedRequestTimeout"'
- name: Uploading core files
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"aaron-bond.better-comments",
"augustocdias.tasks-shell-input",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"editorconfig.editorconfig",
Expand Down
33 changes: 33 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,39 @@
}
]
},
{
"name": "LightingApp (Tizen) [remote]",
"type": "cppdbg",
"request": "launch",
"cwd": "${workspaceFolder}/out/tizen-arm-light",
"program": "${workspaceFolder}/out/tizen-arm-light/chip-lighting-app",
"miDebuggerPath": "${env:TIZEN_SDK_ROOT}/tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-gdb",
"additionalSOLibSearchPath": "${env:TIZEN_ROOTFS}",
"preLaunchTask": "Launch LightingApp with gdbserver attached (Tizen)",
"miDebuggerServerAddress": "localhost:9999",
"linux": {
"MIMode": "gdb"
},
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"text": "set solib-absolute-prefix ${env:TIZEN_ROOTFS}"
},
{
"text": "set sysroot ${env:TIZEN_SDK_SYSROOT}"
},
{
"text": "set debug-file-directory {env:TIZEN_SDK_SYSROOT}/usr/lib/debug"
},
{
"text": "set solib-search-path ${workspaceFolder}/out/tizen-arm-light"
}
]
},

{
"name": "Debug Mbed examples",
Expand Down
77 changes: 77 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,68 @@
"problemMatcher": {
"base": "$gcc"
}
},
{
"label": "Build LightingApp (Tizen)",
"type": "shell",
"command": "scripts/run_in_build_env.sh",
"args": [
"${workspaceFolder}/scripts/build/build_examples.py --target tizen-arm-light --enable-flashbundle build"
],
"group": "build",
"problemMatcher": {
"base": "$gcc"
}
},
{
"label": "Connect to device (Tizen)",
"type": "shell",
"command": "sdb",
"args": ["connect", "${input:tizenTargetDeviceAddress}"],
"problemMatcher": [],
"runOptions": {
"reevaluateOnRerun": false
}
},
{
"label": "Install LightingApp (Tizen)",
"type": "shell",
"command": "sdb",
"args": [
"-s",
"${input:tizenTargetDeviceAddressSdb}",
"install",
"${workspaceFolder}/out/tizen-arm-light/package/out/org.tizen.matter.example.lighting-1.0.0.tpk"
],
"problemMatcher": [],
"runOptions": {
"reevaluateOnRerun": false
}
},
{
"label": "Launch LightingApp with gdbserver attached (Tizen)",
"type": "shell",
"command": "bash",
"args": [
"${workspaceFolder}/scripts/helpers/tizen_gdbserver_run.sh",
"--app-name",
"org.tizen.matter.example.lighting",
"--target",
"${input:tizenTargetDeviceAddressSdb}"
],
"problemMatcher": [],
"runOptions": {
"reevaluateOnRerun": false
},
"isBackground": false,
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "dedicated",
"showReuseMessage": true,
"clear": true
}
}
],
"inputs": [
Expand Down Expand Up @@ -377,6 +439,21 @@
"telink-tlsr9518adk80d-light-switch",
"tizen-arm-light"
]
},
{
"type": "promptString",
"id": "tizenTargetDeviceAddress",
"description": "Enter the target device address and port in format <address>:<port>"
},
{
"id": "tizenTargetDeviceAddressSdb",
"type": "command",
"command": "shellCommand.execute",
"args": {
"command": "sdb devices | grep -v 'List of devices attached' |awk '{print $1 \"|\" $1, $3, \"(\" $2 \")\"}'",
"fieldSeparator": "|",
"description": "Select target device"
}
}
]
}
9 changes: 9 additions & 0 deletions examples/darwin-framework-tool/templates/tests/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ function getTests() {
// TODO: Test_TC_DIAG_TH_NW_2_3 does not work on Darwin for now.
tests.disable('Test_TC_DIAG_TH_NW_2_3');

// TODO: Test_TC_CC_9_1 does not work on Darwin for now.
tests.disable('Test_TC_CC_9_1');

// TODO: Test_TC_CC_9_2 does not work on Darwin for now.
tests.disable('Test_TC_CC_9_2');

// TODO: Test_TC_CC_9_3 does not work on Darwin for now.
tests.disable('Test_TC_CC_9_3');

return tests;
}

Expand Down
79 changes: 63 additions & 16 deletions examples/lighting-app/tizen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ Generating tizen-arm-light

```sh
gn gen --check \
--fail-on-unused-args \
--export-compile-commands \
--root=$PW_PROJECT_ROOT/examples/lighting-app/tizen \
"--args=target_os=\"tizen\" target_cpu=\"arm\" tizen_sdk_root=\"$TIZEN_SDK_ROOT\" tizen_sdk_sysroot=\"$TIZEN_SDK_SYSROOT\"" \
$PW_PROJECT_ROOT/out/tizen-arm-light
--fail-on-unused-args \
--export-compile-commands \
--root=$PW_PROJECT_ROOT/examples/lighting-app/tizen \
"--args=target_os=\"tizen\" target_cpu=\"arm\" tizen_sdk_root=\"$TIZEN_SDK_ROOT\" tizen_sdk_sysroot=\"$TIZEN_SDK_SYSROOT\"" \
$PW_PROJECT_ROOT/out/tizen-arm-light
```

Building tizen-arm-light
Expand All @@ -33,16 +33,16 @@ author data as needed.

```sh
$TIZEN_SDK_ROOT/tools/ide/bin/tizen certificate \
--alias=CHIP \
--name=CHIP \
[email protected] \
--password=chiptizen
--alias=CHIP \
--name=CHIP \
[email protected] \
--password=chiptizen

$TIZEN_SDK_ROOT/tools/ide/bin/tizen security-profiles add \
--active \
--name=CHIP \
--author=$HOME/tizen-sdk-data/keystore/author/author.p12 \
--password=chiptizen
--active \
--name=CHIP \
--author=$HOME/tizen-sdk-data/keystore/author/author.p12 \
--password=chiptizen
```

This is only _one-time action_. To regenerate the author certificate and
Expand All @@ -51,9 +51,9 @@ specified commands:

```sh
rm -r \
$HOME/tizen-sdk-data \
$HOME/.tizen-cli-config \
$HOME/.secretsdb
$HOME/tizen-sdk-data \
$HOME/.tizen-cli-config \
$HOME/.secretsdb
```

After that, normally call scripts to generate the author certificate and
Expand Down Expand Up @@ -97,3 +97,50 @@ e.g.:
```sh
app_launcher --start=org.tizen.matter.example.lighting discriminator 43 wifi true
```

## Vscode support

To run all commands below `sdb` has to be installed on computer and available in
`PATH`. Also vscode has to have the `augustocdias.tasks-shell-input` extension
installed.

### Tasks

1. Build app:

```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Build LightingApp (Tizen)
```

2. SDB connect to device: required to run Tizen commands below if device is
debugged over network

```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task -> Connect to device (Tizen) ->
insert IP address and port
```

3. Install app: it is separated from build app step.

```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Install LightingApp (Tizen)
```

4. Launch LightingApp with gdbserver attached: require to install app
previously.

```
open the Command Palette (Ctrl+Shift+P) ->
Tasks: Run Task ->
Launch LightingApp with gdbserver attached (Tizen)
```

### Debug

To debug app using vscode gdbserver has to be available on the target device,
run `./scripts/helpers/tizen_gdbserver_run.sh --help` for more information.
17 changes: 0 additions & 17 deletions examples/tv-app/android/App/.idea/deploymentTargetDropDown.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import android.widget.EditText;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.NotificationCompat;
import com.tcl.chip.tvapp.UserPrompter;
import com.tcl.chip.tvapp.UserPrompterResolver;
import com.matter.tv.server.tvapp.UserPrompter;
import com.matter.tv.server.tvapp.UserPrompterResolver;

public class MatterCommissioningPrompter extends UserPrompterResolver implements UserPrompter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.matter.tv.server.model.ContentApp;
import com.matter.tv.server.receivers.ContentAppDiscoveryService;
import com.matter.tv.server.service.ContentAppAgentService;
import com.tcl.chip.tvapp.ContentAppEndpointManager;
import com.matter.tv.server.tvapp.ContentAppEndpointManager;

public class ContentAppEndpointManagerImpl implements ContentAppEndpointManager {

Expand Down
Loading

0 comments on commit c978c90

Please sign in to comment.