Skip to content

Commit 8847f21

Browse files
authored
Fix TC-TIMESYNC-2.5, add all to CI (#28021)
* Fix start and end times for dst * Add tests to CI * add pics files * Wrong test
1 parent 3c75ed0 commit 8847f21

File tree

2 files changed

+70
-30
lines changed

2 files changed

+70
-30
lines changed

.github/workflows/tests.yaml

+68-28
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ on:
2121
workflow_dispatch:
2222

2323
concurrency:
24-
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
24+
group:
25+
${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
2526
'pull_request' && github.event.number) || (github.event_name ==
2627
'workflow_dispatch' && github.run_number) || github.sha }}
2728
cancel-in-progress: true
2829

2930
env:
3031
CHIP_NO_LOG_TIMESTAMPS: true
31-
32+
3233
jobs:
3334
test_suites_linux:
3435
name: Test Suites - Linux
@@ -40,15 +41,18 @@ jobs:
4041
env:
4142
BUILD_VARIANT: ${{matrix.build_variant}}
4243
CHIP_TOOL_VARIANT: ${{matrix.chip_tool}}
43-
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
44+
TSAN_OPTIONS:
45+
"halt_on_error=1
46+
suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
4447
LSAN_OPTIONS: detect_leaks=1
4548

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

4952
container:
5053
image: ghcr.io/project-chip/chip-build:1
51-
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
54+
options:
55+
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
5256
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
5357

5458
steps:
@@ -66,9 +70,12 @@ jobs:
6670
- name: Checkout submodules & Bootstrap
6771
uses: ./.github/actions/checkout-submodules-and-bootstrap
6872
with:
69-
platform: linux
70-
bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
71-
- name: Try to ensure the directories for core dumping exist and we
73+
platform: linux
74+
bootstrap-log-name:
75+
bootstrap-logs-linux-${{ matrix.build_variant }}${{
76+
matrix.chip_tool }}
77+
- name:
78+
Try to ensure the directories for core dumping exist and we
7279
can write them.
7380
run: |
7481
mkdir /tmp/cores || true
@@ -212,7 +219,9 @@ jobs:
212219
--bridge-app ./out/linux-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
213220
"
214221
215-
- name: Run Tests using the python parser sending commands to chip-tool
222+
- name:
223+
Run Tests using the python parser sending commands to
224+
chip-tool
216225
# https://github.com/project-chip/connectedhomeip/issues/27673
217226
if: matrix.build_variant != 'no-ble-tsan-clang'
218227
run: |
@@ -271,15 +280,19 @@ jobs:
271280
uses: actions/upload-artifact@v3
272281
if: ${{ failure() && !env.ACT }}
273282
with:
274-
name: crash-core-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
283+
name:
284+
crash-core-linux-${{ matrix.build_variant }}${{
285+
matrix.chip_tool }}
275286
path: /tmp/cores/
276287
# Cores are big; don't hold on to them too long.
277288
retention-days: 5
278289
- name: Uploading objdir for debugging
279290
uses: actions/upload-artifact@v3
280291
if: ${{ failure() && !env.ACT }}
281292
with:
282-
name: crash-objdir-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
293+
name:
294+
crash-objdir-linux-${{ matrix.build_variant }}${{
295+
matrix.chip_tool }}
283296
path: objdir-clone/
284297
# objdirs are big; don't hold on to them too long.
285298
retention-days: 5
@@ -289,14 +302,16 @@ jobs:
289302

290303
strategy:
291304
matrix:
292-
build_variant: [no-ble-asan-clang]
305+
build_variant: [no-ble-asan-clang]
293306
# Since no-ble-tsan-clang doesn't run any tests, this is just wasted CI time for now
294307
chip_tool: [""]
295308
env:
296309
BUILD_VARIANT: ${{matrix.build_variant}}
297310
CHIP_TOOL_VARIANT: ${{matrix.chip_tool}}
298311
TSAN_OPTIONS: "halt_on_error=1"
299-
LSAN_OPTIONS: detect_leaks=1 suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt
312+
LSAN_OPTIONS:
313+
detect_leaks=1
314+
suppressions=scripts/tests/chiptest/lsan-mac-suppressions.txt
300315

301316
if: github.actor != 'restyled-io[bot]'
302317
runs-on: macos-latest
@@ -317,9 +332,10 @@ jobs:
317332
- name: Checkout submodules & Bootstrap
318333
uses: ./.github/actions/checkout-submodules-and-bootstrap
319334
with:
320-
platform: darwin
321-
bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
322-
335+
platform: darwin
336+
bootstrap-log-name:
337+
bootstrap-logs-darwin-${{ matrix.build_variant }}${{
338+
matrix.chip_tool }}
323339

324340
- name: Build Apps
325341
run: |
@@ -353,8 +369,10 @@ jobs:
353369
--bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
354370
"
355371
356-
- name: Run Tests using the python parser sending commands to chip-tool
357-
# https://github.com/project-chip/connectedhomeip/issues/27673
372+
- name:
373+
Run Tests using the python parser sending commands to
374+
chip-tool
375+
# https://github.com/project-chip/connectedhomeip/issues/27673
358376
if: matrix.build_variant != 'no-ble-tsan-clang'
359377
run: |
360378
./scripts/run_in_build_env.sh \
@@ -377,21 +395,27 @@ jobs:
377395
uses: actions/upload-artifact@v3
378396
if: ${{ failure() && !env.ACT }}
379397
with:
380-
name: crash-core-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
398+
name:
399+
crash-core-darwin-${{ matrix.build_variant }}${{
400+
matrix.chip_tool }}
381401
path: /cores/
382402
# Cores are big; don't hold on to them too long.
383403
retention-days: 5
384404
- name: Uploading diagnostic logs
385405
uses: actions/upload-artifact@v3
386406
if: ${{ failure() && !env.ACT }}
387407
with:
388-
name: crash-log-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
408+
name:
409+
crash-log-darwin-${{ matrix.build_variant }}${{
410+
matrix.chip_tool }}
389411
path: ~/Library/Logs/DiagnosticReports/
390412
- name: Uploading objdir for debugging
391413
uses: actions/upload-artifact@v3
392414
if: ${{ failure() && !env.ACT }}
393415
with:
394-
name: crash-objdir-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
416+
name:
417+
crash-objdir-darwin-${{ matrix.build_variant }}${{
418+
matrix.chip_tool }}
395419
path: objdir-clone/
396420
# objdirs are big; don't hold on to them too long.
397421
retention-days: 5
@@ -400,14 +424,17 @@ jobs:
400424
name: REPL Tests - Linux
401425

402426
env:
403-
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
427+
TSAN_OPTIONS:
428+
"halt_on_error=1
429+
suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
404430

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

408434
container:
409435
image: ghcr.io/project-chip/chip-build:1
410-
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
436+
options:
437+
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
411438
net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"
412439

413440
steps:
@@ -416,9 +443,12 @@ jobs:
416443
- name: Checkout submodules & Bootstrap
417444
uses: ./.github/actions/checkout-submodules-and-bootstrap
418445
with:
419-
platform: linux
420-
bootstrap-log-name: bootstrap-logs-linux-${{ matrix.build_variant }}${{ matrix.chip_tool }}
421-
- name: Try to ensure the directories for core dumping exist and we
446+
platform: linux
447+
bootstrap-log-name:
448+
bootstrap-logs-linux-${{ matrix.build_variant }}${{
449+
matrix.chip_tool }}
450+
- name:
451+
Try to ensure the directories for core dumping exist and we
422452
can write them.
423453
run: |
424454
mkdir /tmp/cores || true
@@ -448,7 +478,15 @@ jobs:
448478
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_ACE_1_3.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
449479
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
450480
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_DA_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
451-
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
481+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
482+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
483+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
484+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
485+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_6.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
486+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_7.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
487+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_8.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
488+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_2_9.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
489+
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_TIMESYNC_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
452490
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_DA_1_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values"'
453491
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TestCommissioningTimeSync.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
454492
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace_decode 1" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021"'
@@ -499,8 +537,10 @@ jobs:
499537
- name: Checkout submodules & Bootstrap
500538
uses: ./.github/actions/checkout-submodules-and-bootstrap
501539
with:
502-
platform: darwin
503-
bootstrap-log-name: bootstrap-logs-darwin-${{ matrix.build_variant }}${{ matrix.chip_tool }}
540+
platform: darwin
541+
bootstrap-log-name:
542+
bootstrap-logs-darwin-${{ matrix.build_variant }}${{
543+
matrix.chip_tool }}
504544

505545
- name: Build Python REPL and example apps
506546
run: |

src/python_testing/TC_TIMESYNC_2_5.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ async def test_TC_TIMESYNC_2_5(self):
152152
for i in range(dst_max_size_dut):
153153
year = 3.156e+13
154154
six_months = 1.577e+13
155-
vstart = year*i + six_months
156-
vuntil = year * (i+1)
155+
vstart = th_utc + year*i + six_months
156+
vuntil = th_utc + year * (i+1)
157157
dst.append(dst_struct(offset=3600, validStarting=vstart, validUntil=vuntil))
158158
await self.send_set_dst_cmd(dst=dst)
159159

0 commit comments

Comments
 (0)