summaryrefslogtreecommitdiff
path: root/qa/qt/setup-executables
blob: 2751da1a45276a3d99a3851d93f154888ff1266a (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
38
39
#!/bin/sh
#
# Very ugly picker for executables from a build.
#
# Problem is that /var/lib/pcp/testsuite/qa is populated from the
# packaging, but in a build context the qmc headers are defined in
# ../../src/libpcp_qmc/src but the qmc library and the standard
# PCP headers are not in ../../src they are out in the build area
# c/o Makepkgs
#

if [ -z "$PCP_DIR" ]
then
    . /etc/pcp.conf
else
    . "$PCP_DIR"/etc/pcp.conf
fi

builddir=''
for builddir in ../../build/deb/pcp-$PCP_VERSION/qa/qt $PCP_VAR_DIR/testsuite/qt ''
do
    [ -n "$builddir" -a -d "$builddir" ] && break
done

for x in qmc_*
do
    [ -x $x/$x ] && continue
    echo -n "Hunting for $x executable ... "
    if [ -z "$builddir" ]
    then
	echo "no build dir, not found"
    elif [ -x $builddir/$x/$x ]
    then
	cp $builddir/$x/$x $x/$x
	echo OK
    else
	echo "not found"
    fi
done