From d909e49df8103eb3651bf7f416fddf8b9ac06164 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Tue, 9 Nov 2021 17:21:00 -0800 Subject: [PATCH 1/5] [CI Debug] List all commissionable nodes before starting CI runs --- scripts/tests/test_suites.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/tests/test_suites.sh b/scripts/tests/test_suites.sh index f335fe539db21e..2667a2b8ba959d 100755 --- a/scripts/tests/test_suites.sh +++ b/scripts/tests/test_suites.sh @@ -134,6 +134,8 @@ for j in "${iter_array[@]}"; do # kicking off the subshell, sometimes we try to do it before # the data is there yet. background_pid="$( Date: Tue, 9 Nov 2021 19:31:20 -0800 Subject: [PATCH 2/5] Workaround missing dns-sd on linux, and timeout return error --- scripts/tests/test_suites.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/tests/test_suites.sh b/scripts/tests/test_suites.sh index 2667a2b8ba959d..15bdef5d42ef2e 100755 --- a/scripts/tests/test_suites.sh +++ b/scripts/tests/test_suites.sh @@ -134,8 +134,12 @@ for j in "${iter_array[@]}"; do # kicking off the subshell, sometimes we try to do it before # the data is there yet. background_pid="$( /dev/null + then + echo " * [CI DEBUG] Looking for commissionable Nodes" + # Ignore the error that timeout generates + timeout 5 dns-sd -B _matterc._udp | cat - + fi echo " * Pairing to device" "${test_case_wrapper[@]}" out/debug/standalone/chip-tool pairing qrcode "$node_id" MT:D8XA0CQM00KA0648G00 | tee "$pairing_log_file" echo " * Starting test run: $i" From a188e91c4fb9433300e4af177f32269a4b0d7f69 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Tue, 9 Nov 2021 19:59:51 -0800 Subject: [PATCH 3/5] Ignore in a different way --- scripts/tests/test_suites.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tests/test_suites.sh b/scripts/tests/test_suites.sh index 15bdef5d42ef2e..e931a38331eb79 100755 --- a/scripts/tests/test_suites.sh +++ b/scripts/tests/test_suites.sh @@ -138,7 +138,7 @@ for j in "${iter_array[@]}"; do then echo " * [CI DEBUG] Looking for commissionable Nodes" # Ignore the error that timeout generates - timeout 5 dns-sd -B _matterc._udp | cat - + cat <(timeout 5 dns-sd -B _matterc._udp) fi echo " * Pairing to device" "${test_case_wrapper[@]}" out/debug/standalone/chip-tool pairing qrcode "$node_id" MT:D8XA0CQM00KA0648G00 | tee "$pairing_log_file" From 4f1cc551e3679df7637b4aa7e3cb8244e1a8eef5 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Tue, 9 Nov 2021 20:03:44 -0800 Subject: [PATCH 4/5] Restyle --- scripts/tests/test_suites.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/tests/test_suites.sh b/scripts/tests/test_suites.sh index e931a38331eb79..1ddb79517f6d2b 100755 --- a/scripts/tests/test_suites.sh +++ b/scripts/tests/test_suites.sh @@ -134,8 +134,7 @@ for j in "${iter_array[@]}"; do # kicking off the subshell, sometimes we try to do it before # the data is there yet. background_pid="$( /dev/null - then + if command -v dns-sd &>/dev/null; then echo " * [CI DEBUG] Looking for commissionable Nodes" # Ignore the error that timeout generates cat <(timeout 5 dns-sd -B _matterc._udp) From 65f52e821433b0df846f63587c5aabaac83028a2 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Tue, 9 Nov 2021 22:54:57 -0800 Subject: [PATCH 5/5] Reduce timeout to 1 second to avoid timing out the tests --- scripts/tests/test_suites.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/tests/test_suites.sh b/scripts/tests/test_suites.sh index 1ddb79517f6d2b..4b025baa1a2b9c 100755 --- a/scripts/tests/test_suites.sh +++ b/scripts/tests/test_suites.sh @@ -134,10 +134,11 @@ for j in "${iter_array[@]}"; do # kicking off the subshell, sometimes we try to do it before # the data is there yet. background_pid="$(/dev/null; then echo " * [CI DEBUG] Looking for commissionable Nodes" # Ignore the error that timeout generates - cat <(timeout 5 dns-sd -B _matterc._udp) + cat <(timeout 1 dns-sd -B _matterc._udp) fi echo " * Pairing to device" "${test_case_wrapper[@]}" out/debug/standalone/chip-tool pairing qrcode "$node_id" MT:D8XA0CQM00KA0648G00 | tee "$pairing_log_file"