From 4608b0714f1c37e223a0bd3d2ad7548caa20f771 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 11 Jun 2013 15:17:35 +0100 Subject: [PATCH 6/7] run-test.sh.in: adapt for Idle This is mostly s/GABBLE/IDLE/, s/gabble/idle/ but I also pulled in IDLE_SSL_KEY and IDLE_SSL_CERT, and simplified the setup for various variables that we can make identical in the installed and uninstalled cases. (The installed case isn't implemented yet.) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54114 Signed-off-by: Simon McVittie --- tests/twisted/run-test.sh.in | 51 +++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/tests/twisted/run-test.sh.in b/tests/twisted/run-test.sh.in index 8dd5fd6..928debc 100644 --- a/tests/twisted/run-test.sh.in +++ b/tests/twisted/run-test.sh.in @@ -1,53 +1,54 @@ #!/bin/sh -if test "x$GABBLE_TEST_UNINSTALLED" = x; then - script_fullname=`readlink -e "@gabbletestsdir@/twisted/run-test.sh"` +if test "x$IDLE_TEST_UNINSTALLED" = x; then + echo "The telepathy-idle tests cannot be installed yet" >&2 + exit 1 + # keep this code path for later, assuming it'll work like Gabble... + + script_fullname=`readlink -e "@idletestsdir@/twisted/run-test.sh"` if [ `readlink -e "$0"` != "$script_fullname" ] ; then echo "This script is meant to be installed at $script_fullname" >&2 exit 1 fi - test_src="@gabbletestsdir@" - test_build="@gabbletestsdir@" - config_file="@gabbletestsdir@/twisted/tools/servicedir/tmp-session-bus.conf" - - PYTHONPATH="@gabbletestsdir@/twisted" - export PYTHONPATH - - GABBLE_TWISTED_PATH="@gabbletestsdir@/twisted" - export GABBLE_TWISTED_PATH + test_src="@idletestsdir@" + test_build="@idletestsdir@" else - if test -z "$GABBLE_ABS_TOP_SRCDIR"; then - echo "GABBLE_ABS_TOP_SRCDIR must be set" >&2 + if test -z "$IDLE_ABS_TOP_SRCDIR"; then + echo "IDLE_ABS_TOP_SRCDIR must be set" >&2 exit 1 fi - if test -z "$GABBLE_ABS_TOP_BUILDDIR"; then - echo "GABBLE_ABS_TOP_BUILDDIR must be set" >&2 + if test -z "$IDLE_ABS_TOP_BUILDDIR"; then + echo "IDLE_ABS_TOP_BUILDDIR must be set" >&2 exit 1 fi - test_src="${GABBLE_ABS_TOP_SRCDIR}/tests" - test_build="${GABBLE_ABS_TOP_BUILDDIR}/tests" - config_file="${test_build}/twisted/tools/servicedir-uninstalled/tmp-session-bus.conf" + test_src="${IDLE_ABS_TOP_SRCDIR}/tests" + test_build="${IDLE_ABS_TOP_BUILDDIR}/tests" +fi - PYTHONPATH="${test_src}/twisted:${test_build}/twisted" - export PYTHONPATH +config_file="${test_build}/twisted/tools/tmp-session-bus.conf" - GABBLE_TWISTED_PATH="${test_src}/twisted" - export GABBLE_TWISTED_PATH -fi +PYTHONPATH="${test_src}/twisted:${test_build}/twisted" +export PYTHONPATH +IDLE_TWISTED_PATH="${test_src}/twisted" +export IDLE_TWISTED_PATH +IDLE_SSL_KEY="${test_src}/twisted/tools/idletest.key" +export IDLE_SSL_KEY +IDLE_SSL_CERT="${test_src}/twisted/tools/idletest.cert" +export IDLE_SSL_CERT if [ -n "$1" ] ; then list="$1" else - list=$(cat "${test_build}"/twisted/gabble-twisted-tests.list) + list=$(cat "${test_build}"/twisted/idle-twisted-tests.list) fi any_failed=0 for i in $list ; do echo "Testing $i ..." sh "${test_src}/twisted/tools/with-session-bus.sh" \ - ${GABBLE_TEST_SLEEP} \ + ${IDLE_TEST_SLEEP} \ --config-file="${config_file}" \ -- \ @TEST_PYTHON@ -u "${test_src}/twisted/$i" -- 1.7.10.4