Skip to content

Commit bb29b8f

Browse files
Update CI dependencies and fix static callback in test
Added at-spi2-core and xfce4-session to CI dependencies for improved test environment setup. Redirected Xvfb, xfwm4, and xfce4-panel output to /dev/null to reduce log noise. Marked notification_callback as static in test_tray.cpp to resolve potential linkage or lifetime issues.
1 parent a237973 commit bb29b8f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
run: |
5252
sudo apt-get update
5353
sudo apt-get install -y \
54+
at-spi2-core \
5455
build-essential \
5556
cmake \
5657
${{ matrix.appindicator }} \
@@ -62,6 +63,7 @@ jobs:
6263
ninja-build \
6364
xfce4-goodies \
6465
xfce4-panel \
66+
xfce4-session \
6567
xfwm4 \
6668
xvfb
6769
@@ -175,13 +177,13 @@ jobs:
175177
run: |
176178
if [ "${{ runner.os }}" = "Linux" ]; then
177179
export DISPLAY=:1
178-
Xvfb ${DISPLAY} -screen 0 1920x1080x24 &
180+
Xvfb ${DISPLAY} -screen 0 1920x1080x24 2>/dev/null &
179181
XVFB_PID=$!
180182
sleep 2
181183
dbus-run-session -- bash -c '
182-
xfwm4 &
184+
xfwm4 2>/dev/null &
183185
WM_PID=$!
184-
xfce4-panel &
186+
xfce4-panel 2>/dev/null &
185187
PANEL_PID=$!
186188
sleep 8
187189
./test_tray --gtest_color=yes --gtest_output=xml:test_results.xml

tests/unit/test_tray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ TEST_F(TrayTest, TestNotificationCallback) {
327327
}
328328
#endif
329329

330-
auto notification_callback = []() {
330+
static auto notification_callback = []() {
331331
// Callback would be invoked by user interaction
332332
};
333333

0 commit comments

Comments
 (0)