Skip to content

Commit 56f201a

Browse files
authored
Add check to Lockbud CI job (#6898)
1 parent d1061dc commit 56f201a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/test-suite.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@ jobs:
6565
- name: Install dependencies
6666
run: apt update && apt install -y cmake libclang-dev
6767
- name: Check for deadlocks
68-
run: |
69-
cargo lockbud -k deadlock -b -l tokio_util
68+
run: ./scripts/ci/check-lockbud.sh
7069

7170
target-branch-check:
7271
name: target-branch-check

scripts/ci/check-lockbud.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Run lockbud to check for deadlocks and capture the output
4+
output=$(cargo lockbud -k deadlock -b -l tokio_util 2>&1)
5+
6+
# Check if lockbud returned any issues
7+
if echo "$output" | grep -q '"bug_kind"'; then
8+
# Print the JSON payload
9+
echo "Lockbud detected issues:"
10+
echo "$output"
11+
12+
# Exit with a non-zero status to indicate an error
13+
exit 1
14+
else
15+
echo "No issues detected by Lockbud."
16+
exit 0
17+
fi

0 commit comments

Comments
 (0)