From a92e73dc1829b9731148bff732b1c817355dc254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 12 Oct 2013 11:25:54 +0200 Subject: [PATCH 1/4] travis: check htmlreport via --errorlist output --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8c3c6cacd..fa6250e5a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,10 @@ script: - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive test" --report-dir . - ../cppcheck ../gui/test --enable=all --inconclusive --verbose --xml-version=2 2> gui_test.xml - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive + verbose test" --report-dir . + - ../cppcheck --errorlist > errorlist.xml + - ./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir . + - ../cppcheck --errorlist --inconclusive --xml-version=2 > errorlist.xml + - ./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir . - cd ../ - mkdir install_test - make DESTDIR=install_test install From 9d95200cb40fa862e1cf2b713dc6e2fef7aaeb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 12 Oct 2013 11:38:25 +0200 Subject: [PATCH 2/4] travis: check all xml files cppcheck generated during tests of htmlreport via xmllint as suggested in 'createrelease'. --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fa6250e5a..b3cc33a53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: - make test SRCDIR=build VERIFY=1 -j 4 - ./cppcheck --error-exitcode=1 -Ilib --enable=style --suppress=duplicateBranch cli gui lib -igui/test - sudo apt-get update - - sudo apt-get install python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake + - sudo apt-get install python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils - cd gui - qmake - make -j 4 @@ -17,12 +17,16 @@ script: - ./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v1.xml --title "xml1 test" --report-dir . --source-dir ../test/ - ./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v2.xml --title "xml2 test" --report-dir . --source-dir ../test/ - ../cppcheck ../gui/test --enable=all --inconclusive --xml-version=2 2> gui_test.xml + - xmllint --noout gui_test.xml - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive test" --report-dir . - ../cppcheck ../gui/test --enable=all --inconclusive --verbose --xml-version=2 2> gui_test.xml + - xmllint --noout gui_test.xml - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive + verbose test" --report-dir . - ../cppcheck --errorlist > errorlist.xml + - xmllint --noout errorlist.xml - ./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir . - ../cppcheck --errorlist --inconclusive --xml-version=2 > errorlist.xml + - xmllint --noout errorlist.xml - ./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir . - cd ../ - mkdir install_test From 7c1f6ab9dc8021e66ba4a48bd44eab41c167aa04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 12 Oct 2013 12:40:20 +0200 Subject: [PATCH 3/4] travis: install deps as suggested by travis manual (via before_install) --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b3cc33a53..651a0362a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,13 @@ language: cpp compiler: - gcc - clang +before_install: + - sudo apt-get update -qq + - sudo apt-get install -qq python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils script: - mkdir build - make test SRCDIR=build VERIFY=1 -j 4 - ./cppcheck --error-exitcode=1 -Ilib --enable=style --suppress=duplicateBranch cli gui lib -igui/test - - sudo apt-get update - - sudo apt-get install python-pygments libqt4-core libqt4-gui libqt4-dev qt4-dev-tools qt4-qmake libxml2-utils - cd gui - qmake - make -j 4 From 8397d99370c22254a22f5057826378cb46ff0c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sat, 12 Oct 2013 15:49:42 +0200 Subject: [PATCH 4/4] travis: move htmlreport checks into /htmlreport/checks.sh and make travis run it. --- .travis.yml | 15 +-------------- htmlreport/check.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 14 deletions(-) create mode 100755 htmlreport/check.sh diff --git a/.travis.yml b/.travis.yml index 651a0362a..c4b86040c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,20 +15,7 @@ script: - cd ../ - ./htmlreport/test_htmlreport.py - cd htmlreport - - ./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v1.xml --title "xml1 test" --report-dir . --source-dir ../test/ - - ./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v2.xml --title "xml2 test" --report-dir . --source-dir ../test/ - - ../cppcheck ../gui/test --enable=all --inconclusive --xml-version=2 2> gui_test.xml - - xmllint --noout gui_test.xml - - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive test" --report-dir . - - ../cppcheck ../gui/test --enable=all --inconclusive --verbose --xml-version=2 2> gui_test.xml - - xmllint --noout gui_test.xml - - ./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive + verbose test" --report-dir . - - ../cppcheck --errorlist > errorlist.xml - - xmllint --noout errorlist.xml - - ./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir . - - ../cppcheck --errorlist --inconclusive --xml-version=2 > errorlist.xml - - xmllint --noout errorlist.xml - - ./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir . + - ./check.sh - cd ../ - mkdir install_test - make DESTDIR=install_test install diff --git a/htmlreport/check.sh b/htmlreport/check.sh new file mode 100755 index 000000000..3815480ef --- /dev/null +++ b/htmlreport/check.sh @@ -0,0 +1,27 @@ +#!/bin/bash -ex + + +./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v1.xml --title "xml1 test" --report-dir . --source-dir ../test/ +./cppcheck-htmlreport --file ../gui/test/data/xmlfiles/xmlreport_v2.xml --title "xml2 test" --report-dir . --source-dir ../test/ +echo -e "\n" + + +../cppcheck ../gui/test --enable=all --inconclusive --xml-version=2 2> gui_test.xml +xmllint --noout gui_test.xml +./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive test" --report-dir . +echo "" + +../cppcheck ../gui/test --enable=all --inconclusive --verbose --xml-version=2 2> gui_test.xml +xmllint --noout gui_test.xml +./cppcheck-htmlreport --file ./gui_test.xml --title "xml2 + inconclusive + verbose test" --report-dir . +echo -e "\n" + + +../cppcheck --errorlist > errorlist.xml +xmllint --noout errorlist.xml +./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir . +echo "" + +../cppcheck --errorlist --inconclusive --xml-version=2 > errorlist.xml +xmllint --noout errorlist.xml +./cppcheck-htmlreport --file ./errorlist.xml --title "errorlist" --report-dir .