summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--3rdParty/CppUnit/src/BriefTestProgressListener.cpp2
-rwxr-xr-xBuildTools/Coverage/FilterLCovData.py2
-rwxr-xr-xBuildTools/Coverage/GenerateCoverageResults.sh28
3 files changed, 11 insertions, 21 deletions
diff --git a/3rdParty/CppUnit/src/BriefTestProgressListener.cpp b/3rdParty/CppUnit/src/BriefTestProgressListener.cpp
index c38cea0..120e6d5 100644
--- a/3rdParty/CppUnit/src/BriefTestProgressListener.cpp
+++ b/3rdParty/CppUnit/src/BriefTestProgressListener.cpp
@@ -37,7 +37,7 @@ BriefTestProgressListener::addFailure( const TestFailure &failure )
void
-BriefTestProgressListener::endTest( Test *test )
+BriefTestProgressListener::endTest( Test *)
{
if ( !m_lastTestFailed )
stdCOut() << " : OK";
diff --git a/BuildTools/Coverage/FilterLCovData.py b/BuildTools/Coverage/FilterLCovData.py
index 8d56a7f..a3a7ee5 100755
--- a/BuildTools/Coverage/FilterLCovData.py
+++ b/BuildTools/Coverage/FilterLCovData.py
@@ -7,7 +7,7 @@ import sys, re, os.path
assert(len(sys.argv) == 2)
def isIgnored(file) :
- return (find.find("/Swiften/") == -1 and find.find("/Slimber/") == -1 and find.find("/Swift/") == -1) or (find.find("/UnitTest/") != -1 or find.find("/QA/") != -1)
+ return (file.find("/Swiften/") == -1 and file.find("/Slimber/") == -1 and file.find("/Swift/") == -1) or (file.find("/UnitTest/") != -1 or file.find("/QA/") != -1)
output = []
diff --git a/BuildTools/Coverage/GenerateCoverageResults.sh b/BuildTools/Coverage/GenerateCoverageResults.sh
index d3e6b12..f06c484 100755
--- a/BuildTools/Coverage/GenerateCoverageResults.sh
+++ b/BuildTools/Coverage/GenerateCoverageResults.sh
@@ -1,35 +1,25 @@
#!/bin/sh
-# This script assumes that it is run from the toplevel directory, that
-# the 'configure' script has been called with '--enable-coverage'
-
-if [ ! -f config.status ]; then
- echo "Please configure your build with --enable-coverage and rebuild."
- exit -1
-fi
-grep -q "\-\-enable-coverage" config.status
-if [ "$?" != 0 ]; then
- echo "Please configure your build with --enable-coverage and rebuild."
- exit -1
-fi
+# This script assumes that it is run from the toplevel directory
SOURCE_DIR=.
-SCRIPT_DIR=Tools/Coverage
+SCRIPT_DIR=BuildTools/Coverage
LCOVDIR=3rdParty/LCov
-RESULTS_DIR=Tools/Coverage/results
+RESULTS_DIR=BuildTools/Coverage/results
OUTPUT_DIR=$RESULTS_DIR/coverage-`git log --pretty=format:%ct-%h | head -n 1`
-make -C $SOURCE_DIR
-if [ ! -f $OUTPUT_DIR ]; then
- mkdir -p $OUTPUT_DIR
+if [ ! -d $OUTPUT_DIR ]; then
+ mkdir -p $OUTPUT_DIR
fi
# Reset counters
$LCOVDIR/lcov --zerocounters --directory $SOURCE_DIR
-# All tests
-make -C $SOURCE_DIR test
+# Build & run all tests
+scons coverage=1 test=all
+
+# Run SCons
$LCOVDIR/lcov --capture --directory $SOURCE_DIR -b $SOURCE_DIR --output-file $OUTPUT_DIR/all.info --test-name all
cp $OUTPUT_DIR/all.info $OUTPUT_DIR/all.info.orig
$SCRIPT_DIR/FilterLCovData.py $OUTPUT_DIR/all.info