# get standard environment, filters and checks
. ./common.product
. ./common.filter
. ./common.check

. ./common.config

export PCP_STDERR=""

host=`hostname`

if [ -z "$DISPLAY" ]
then
    export DISPLAY=$PCPQA_CLOSE_X_SERVER
fi

# hackery for dbus-based environments
#
unset DBUS_SESSION_BUS_PID DBUS_SESSION_BUS_ADDRESS
if which dbus-launch >/dev/null 2>&1
then
    eval `dbus-launch 2>/dev/null | grep '^DBUS_SESSION_BUS'`
fi

# general trap handler cleanup routine for qt checkers
_cleanup_qt()
{
    # if we started a dbus-daemon above, we should clean it up
    [ -z "$DBUS_SESSION_BUS_PID" ] || kill $DBUS_SESSION_BUS_PID
    unset DBUS_SESSION_BUS_PID DBUS_SESSION_BUS_ADDRESS
    $sudo rm -rf $tmp.*
}
