summaryrefslogtreecommitdiffstats
path: root/tdeunittest/tdeunittestmod
blob: f58726925e80ac7baaa5e2c803d155d36d0aefec (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
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

FOLDER="--folder $PWD"
QUERY=""

while [ "$#" -gt 0 ]
do
    case $1 in
        -f|--folder)
            FOLDER="--folder $2"
            shift
        ;;
        -q|--query)
            QUERY="--query $2"
            shift
        ;;
    esac
    # to process the next parameter
    shift
done

APP=`which tdeunittestguimodrunner`
if [ ! -x $APP ]
then
    kdialog --error "Sorry, $APP is not a valid executable file."
    exit 1;
fi

DEBUGHELPER=`which tdeunittest_debughelper`
if [ -z $DEBUGHELPER ]
then
    kdialog --error "Sorry, couldn't find the tdeunittest_debughelper script."
    exit 3
fi

DCOPNAME="KUnitTestModRunner"
$APP --enable-dbgcap $FOLDER $QUERY 2>&1 | perl $DEBUGHELPER "$DCOPNAME-*"