~stgraber/indicator-datetime/fix-deps

« back to all changes in this revision

Viewing changes to tests/run-eds-test.sh

Improve valarm support to honor calendar events' valarm triggers. Fixes: #1419001
Approved by: Ted Gould, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
echo ARG0=$0 # this script
 
4
echo ARG1=$1 # full executable path of dbus-test-runner
 
5
echo ARG2=$2 # full executable path of test app
 
6
echo ARG3=$3 # test name
 
7
echo ARG4=$4 # full executable path of evolution-calendar-factory
 
8
echo ARG5=$5 # bus service name of calendar factory
 
9
echo ARG6=$6 # full exectuable path of evolution-source-registry
 
10
echo ARG7=$7 # full executable path of gvfs
 
11
echo ARG8=$8 # config files
 
12
 
 
13
# set up the tmpdir and tell the shell to purge it when we exit
 
14
export TEST_TMP_DIR=$(mktemp -p "${TMPDIR:-/tmp}" -d $3-XXXXXXXXXX) || exit 1
 
15
echo "running test '$3' in ${TEST_TMP_DIR}"
 
16
 
 
17
# set up the environment variables
 
18
export QT_QPA_PLATFORM=minimal
 
19
export HOME=${TEST_TMP_DIR}
 
20
export XDG_RUNTIME_DIR=${TEST_TMP_DIR}
 
21
export XDG_CACHE_HOME=${TEST_TMP_DIR}/.cache
 
22
export XDG_CONFIG_HOME=${TEST_TMP_DIR}/.config
 
23
export XDG_DATA_HOME=${TEST_TMP_DIR}/.local/share
 
24
export XDG_DESKTOP_DIR=${TEST_TMP_DIR}
 
25
export XDG_DOCUMENTS_DIR=${TEST_TMP_DIR}
 
26
export XDG_DOWNLOAD_DIR=${TEST_TMP_DIR}
 
27
export XDG_MUSIC_DIR=${TEST_TMP_DIR}
 
28
export XDG_PICTURES_DIR=${TEST_TMP_DIR}
 
29
export XDG_PUBLICSHARE_DIR=${TEST_TMP_DIR}
 
30
export XDG_TEMPLATES_DIR=${TEST_TMP_DIR}
 
31
export XDG_VIDEOS_DIR=${TEST_TMP_DIR}
 
32
export QORGANIZER_EDS_DEBUG=On
 
33
export GIO_USE_VFS=local # needed to ensure GVFS shuts down cleanly after the test is over
 
34
 
 
35
echo HOMEDIR=${HOME}
 
36
rm -rf ${XDG_DATA_HOME}
 
37
 
 
38
# if there are canned config files for this test, move them into place now
 
39
if [ -d $8 ]; then
 
40
  echo "copying files from $8 to $HOME"
 
41
  cp --verbose --archive $8/. $HOME
 
42
fi
 
43
 
 
44
# run dbus-test-runner
 
45
$1 --keep-env --max-wait=90 \
 
46
--task $2 --task-name $3 --wait-until-complete --wait-for=org.gnome.evolution.dataserver.Calendar4 \
 
47
--task $4 --task-name "evolution" --wait-until-complete -r
 
48
#--task $6 --task-name "source-registry" --wait-for=org.gtk.vfs.Daemon -r \
 
49
#--task $7 --task-name "gvfsd" -r
 
50
rv=$?
 
51
 
 
52
# if the test passed, blow away the tmpdir
 
53
if [ $rv -eq 0 ]; then
 
54
    rm -rf $TEST_TMP_DIR
 
55
fi
 
56
 
 
57
return $rv