commit 81e5ab65f286a03bb72e42f21c0d819568228dde
parent 00f410332680f7ac731fd672bf8bc8ff821225aa
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Wed, 27 Nov 2019 17:07:40 +0100
resume old lcov logic from old commits
Diffstat:
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/buildbot/coverage.sh b/buildbot/coverage.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -eu
+
+PAUSE_LOCKFILE=/tmp/buildbot_pause.lock
+
+if [ -f $PAUSE_LOCKFILE ]; then
+echo "The Buildbot is paused, remove ${PAUSE_LOCKFILE} to resume."
+
+# Treat this as error, so dependent schedulers won't fire up.
+exit 1
+fi
+
+source "${HOME}/activate"
+taler-deployment bootstrap
+taler-deployment build
+
+for codebase in merchant exchange ; do
+ TOP="$HOME/sources/${codebase}/"
+ REPORT_DIR="$HOME/sources/${codebase}/coverage_report"
+ cd $TOP
+ TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB \
+ TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB \
+ TALER_AUDITORDB_POSTGRES_CONFIG=$TALER_CHECKDB \
+ make check || exit 1
+ mkdir -p $REPORT_DIR
+ lcov -d $TOP -z
+ lcov -d $TOP -c --no-external -o $REPORT_DIR/coverage.info
+ lcov -r $REPORT_DIR/coverage.info **/test_* -o $REPORT_DIR/rcoverage.info
+ genhtml -o $REPORT_DIR $REPORT_DIR/rcoverage.info
+ chmod a+rx -R $REPORT_DIR
diff --git a/buildbot/master.cfg b/buildbot/master.cfg
@@ -422,7 +422,7 @@ LCOV_FACTORY.addStep(
name="invalidation",
description="Invalidating timestamps",
descriptionDone="timestamps invalidated",
- command=["./build.sh"],
+ command=["./coverage.sh"],
workdir="../../deployment/buildbot",
env={"TALER_CHECKDB": "postgres:///talercheck-${USER}"},
haltOnFailure=True