1 |
commit: c23a51e58606afb2b98177caf47ae6aa6c6dc610 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 2 12:01:26 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 2 12:01:26 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=c23a51e5 |
7 |
|
8 |
travis: try running tests using Valgrind |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
.travis.yml | 1 + |
13 |
tests/valgrind-wrapper/qvalgrind | 2 ++ |
14 |
travis/main.sh | 5 +++++ |
15 |
3 files changed, 8 insertions(+) |
16 |
|
17 |
diff --git a/.travis.yml b/.travis.yml |
18 |
index 83a6ff6..97c8e85 100644 |
19 |
--- a/.travis.yml |
20 |
+++ b/.travis.yml |
21 |
@@ -24,6 +24,7 @@ addons: |
22 |
packages: |
23 |
- libgpgme11-dev |
24 |
- gnupg2 |
25 |
+ - valgrind |
26 |
|
27 |
before_install: |
28 |
- ./travis/install-blake2.sh |
29 |
|
30 |
diff --git a/tests/valgrind-wrapper/qvalgrind b/tests/valgrind-wrapper/qvalgrind |
31 |
index 679c387..ad02269 100755 |
32 |
--- a/tests/valgrind-wrapper/qvalgrind |
33 |
+++ b/tests/valgrind-wrapper/qvalgrind |
34 |
@@ -14,6 +14,8 @@ ret=$? |
35 |
if [[ ${ret} == 234 ]] ; then |
36 |
mv q-valgrind.log q-valgrind.$$.log |
37 |
echo "valgrind log can be found at ${PWD}/q-valgrind.$$.log" > /dev/stderr |
38 |
+ # dump complaints in Travis' log, as we cannot retrieve them lateron |
39 |
+ [[ -n ${TRAVIS_OS_NAME} ]] && cat q-valgrind.$$.log > /dev/stderr |
40 |
else |
41 |
rm q-valgrind.log |
42 |
fi |
43 |
|
44 |
diff --git a/travis/main.sh b/travis/main.sh |
45 |
index c5f7670..50f10c7 100755 |
46 |
--- a/travis/main.sh |
47 |
+++ b/travis/main.sh |
48 |
@@ -49,6 +49,11 @@ main() { |
49 |
do_run ${DEFARGS} --enable-qmanifest --disable-qtegrity |
50 |
do_run ${DEFARGS} --disable-qmanifest --disable-qtegrity |
51 |
|
52 |
+ if [[ ${TRAVIS_OS_NAME} == linux ]] ; then |
53 |
+ do_run CFLAGS=-g Q_RUN_WITH_VALGRIND=1 \ |
54 |
+ ${DEFARGS} --enable-qmanifest --enable-qtegrity |
55 |
+ fi |
56 |
+ |
57 |
# LSan needs sudo, which we don't use at the moment |
58 |
# Debug build w/ASAN and such enabled. |
59 |
#m debug |