Skip to content

Commit 7094975

Browse files
committed
debug output
1 parent 1577137 commit 7094975

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

.github/workflows/debian-packages.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,40 @@ jobs:
150150
- name: Test greenwave_monitor execution
151151
run: |
152152
source /opt/ros/${{ matrix.ros_distro }}/setup.bash
153+
154+
# Start node in background
153155
ros2 run greenwave_monitor greenwave_monitor > /dev/null 2>&1 & echo $! > /tmp/gwm.pid
156+
echo "Started greenwave_monitor with PID: $(cat /tmp/gwm.pid)"
157+
158+
# Wait for node startup
154159
sleep 5
160+
161+
# Check if process is still running
162+
if ps -p $(cat /tmp/gwm.pid) > /dev/null; then
163+
echo "✓ Process is running"
164+
else
165+
echo "✗ Process died!"
166+
exit 1
167+
fi
168+
169+
# List nodes
170+
echo "Running ros2 node list..."
155171
ros2 node list | tee /tmp/nodes.txt
156-
grep -q greenwave_monitor /tmp/nodes.txt
172+
echo "Nodes found:"
173+
cat /tmp/nodes.txt
174+
175+
# Check if our node is in the list
176+
if grep -q greenwave_monitor /tmp/nodes.txt; then
177+
echo "✓ Node found in list"
178+
else
179+
echo "✗ Node NOT found in list"
180+
echo "This is unexpected - failing test"
181+
kill -9 $(cat /tmp/gwm.pid) 2>/dev/null || true
182+
exit 1
183+
fi
184+
185+
# Cleanup
157186
kill -INT "$(cat /tmp/gwm.pid)" || true
158-
wait "$(cat /tmp/gwm.pid)" || true
187+
sleep 2
188+
kill -9 $(cat /tmp/gwm.pid) 2>/dev/null || true
159189
shell: bash

0 commit comments

Comments
 (0)