#!/bin/sh

# do not run in the source tree, as we want to check the system-installed
# apport
TESTDIR=${ADTTMP:-/tmp}/apport-tests
mkdir -p $TESTDIR
cp test/test_* test/run "$TESTDIR"
cd "$TESTDIR"

# clean up old crash reports
rm -rf /var/crash/*

export GNUPGHOME=$TESTDIR/gnupg
mkdir -m 700 $GNUPGHOME

./run
ret=$?
echo "Number of failed tests: $ret"
exit $ret
