1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gc: add -gc boehm_leak for leak detection (#9464)

This commit is contained in:
Uwe Krüger
2021-03-25 16:52:33 +01:00
committed by GitHub
parent 03d56865e3
commit 257eadd2e1
9 changed files with 87 additions and 15 deletions

View File

@@ -140,6 +140,21 @@ jobs:
- name: Self tests with `-gc boehm`
## The test cases are run with non-gc `v` for now
run: ./v -gc boehm -silent test-self
- name: Test leak detector
run: |
./v -gc boehm_leak -o testcase_leak vlib/v/tests/testcase_leak.v
./testcase_leak 2>leaks.txt
grep "Found 1 leaked object" leaks.txt && grep ", sz=1000," leaks.txt
- name: Test leak detector not being active for `-gc boehm`
run: |
./v -gc boehm -o testcase_leak vlib/v/tests/testcase_leak.v
./testcase_leak 2>leaks.txt
[ "$(stat -c %s leaks.txt)" = "0" ]
- name: Test leak detector not being active for normal compile
run: |
./v -o testcase_leak vlib/v/tests/testcase_leak.v
./testcase_leak 2>leaks.txt
[ "$(stat -c %s leaks.txt)" = "0" ]
misc-tooling:
runs-on: ubuntu-20.04