Skip to content

Commit 4799fe1

Browse files
Fix and re-enable Linux tv casting commissioner-generated-passcode CI test
1 parent a854245 commit 4799fe1

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.github/workflows/examples-linux-tv-casting-app.yaml

+7-10
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,13 @@ jobs:
7272
"python3 ./scripts/tests/run_tv_casting_test.py"
7373
timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.
7474

75-
# TODO: this test is flaky and was disabled
76-
# https://github.com/project-chip/connectedhomeip/issues/34598
77-
#
78-
# - name:
79-
# Test casting from Linux tv-casting-app to Linux tv-app -
80-
# Commissioner Generated Passcode
81-
# run: |
82-
# ./scripts/run_in_build_env.sh \
83-
# "python3 ./scripts/tests/run_tv_casting_test.py --commissioner-generated-passcode=True"
84-
# timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.
75+
- name:
76+
Test casting from Linux tv-casting-app to Linux tv-app -
77+
Commissioner Generated Passcode
78+
run: |
79+
./scripts/run_in_build_env.sh \
80+
"python3 ./scripts/tests/run_tv_casting_test.py --commissioner-generated-passcode=True"
81+
timeout-minutes: 2 # Comment this out to debug if GitHub Action times out.
8582

8683
- name: Uploading Size Reports
8784
uses: ./.github/actions/upload-size-reports

examples/tv-casting-app/linux/simple-app-helper.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,6 @@ CHIP_ERROR CommandHandler(int argc, char ** argv)
450450

451451
targetCastingPlayer->VerifyOrEstablishConnection(connectionCallbacks, matter::casting::core::kCommissioningWindowTimeoutSec,
452452
idOptions);
453-
ChipLogProgress(AppServer, "CommandHandler() request, VerifyOrEstablishConnection() called, calling StopDiscovery()");
454-
// Stop discovery since we have discovered, and are now connecting to the desired CastingPlayer.
455-
matter::casting::core::CastingPlayerDiscovery::GetInstance()->StopDiscovery();
456453
return CHIP_NO_ERROR;
457454
}
458455
if (strcmp(argv[0], "setcommissionerpasscode") == 0)
@@ -514,6 +511,7 @@ CHIP_ERROR CommandHandler(int argc, char ** argv)
514511
}
515512
return err;
516513
}
514+
return CHIP_NO_ERROR;
517515
}
518516
else
519517
{

src/platform/Linux/bluez/BluezAdvertisement.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ CHIP_ERROR BluezAdvertisement::Init(BluezAdapter1 * apAdapter, const char * aAdv
119119
GAutoPtr<char> rootPath;
120120
g_object_get(G_OBJECT(mEndpoint.GetGattApplicationObjectManager()), "object-path", &rootPath.GetReceiver(), nullptr);
121121
g_snprintf(mAdvPath, sizeof(mAdvPath), "%s/advertising", rootPath.get());
122-
g_strlcpy(mAdvUUID, aAdvUUID, sizeof(mAdvUUID));
122+
123+
if (aAdvUUID != nullptr)
124+
{
125+
g_strlcpy(mAdvUUID, aAdvUUID, sizeof(mAdvUUID));
126+
}
123127

124128
if (aAdvName != nullptr)
125129
{

0 commit comments

Comments
 (0)