summaryrefslogtreecommitdiff
path: root/devtools/gpsd-debian-regressions.sh
blob: fc5f2fd63e2bd353e34fcb7da29152d6d5d4ea80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

# This file is Copyright (c)2010 by the GPSD project
# BSD terms apply: see the file COPYING in the distribution root for details.

set -e

logs='last'
if [ -n "$1" ]; then
    logs=$1
fi

if [ ! -x /usr/bin/getbuildlog ]; then
	echo 'Please install the devscripts package!'
	exit 1
fi

TMPDIR=`mktemp -d`
OLDPWD=`pwd`

cd ${TMPDIR}
getbuildlog gpsd $logs || true
grep -c -E -- '--- (./)?test' * | grep -E ':0$' | sed 's,^gpsd_[^_]*_\([^.]*\)\.log:0,\1: no regressions,'
grep -E -- '--- (./)?test' * | sed 's,\s2013.*,,;s,^gpsd_[^_]*_\([^.]*\)\.log:--- ,\1 ,' | sort -u
cd ${OLDPWD}
rm -rf ${TMPDIR}