Skip to content

Commit 72df543

Browse files
committed
add valgrind test
1 parent 9227866 commit 72df543

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v4
1616

1717
- name: install dependencies
18-
run: sudo apt-get update && sudo apt-get install -y libcriterion-dev
18+
run: sudo apt-get update && sudo apt-get install -y libcriterion-dev valgrind
1919

2020
- name: run test build
2121
run: ./build/test.sh

build/test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,13 @@ export WORKDIR=$(mktemp -d)
33

44
set -e
55
cc -DTEST -lcriterion -o "${WORKDIR}/libion_test" ./src/*.c
6+
7+
echo "running tests"
68
"${WORKDIR}/libion_test" --verbose
9+
10+
if [ -x "$(command -v valgrind)" ]; then
11+
echo "valgrind found"
12+
valgrind "${WORKDIR}/libion_test"
13+
else
14+
echo "valgrind not found"
15+
fi

0 commit comments

Comments
 (0)