aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-12 16:15:38 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-03-12 16:15:38 +0100
commit6b77c86bb91af090fde9a0505b99fa908c41dd8b (patch)
tree30af4b2c601bba1d6bf029ab3804594af62637eb /tests
parentafd70079f631e8a19c8f1c3049bed28e9afe7891 (diff)
downloadayatana-indicator-sound-6b77c86bb91af090fde9a0505b99fa908c41dd8b.tar.gz
ayatana-indicator-sound-6b77c86bb91af090fde9a0505b99fa908c41dd8b.tar.bz2
ayatana-indicator-sound-6b77c86bb91af090fde9a0505b99fa908c41dd8b.zip
tests/CmakeLists.txt: Provide XDG_RUNTIME_DIR in test environment.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt3
-rw-r--r--tests/integration/CMakeLists.txt1
-rw-r--r--tests/integration/indicator-sound-test-base.cpp1
3 files changed, 4 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 68c0fcc..0290969 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -15,6 +15,7 @@ set_source_files_properties (gschemas.compiled GENERATED)
# and help the tests to find that file by setting -DSCHEMA_DIR
set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas")
set (TEST_HOME "${CMAKE_CURRENT_BINARY_DIR}/test-home")
+set (XDG_RUNTIME_DIR "${TEST_HOME}/.config")
set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas")
if (EXISTS /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml)
set (SOUND_SCHEMA /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml)
@@ -33,7 +34,7 @@ add_custom_command (OUTPUT gschemas.compiled
COMMAND cp -f ${SOUND_SCHEMA} ${SCHEMA_DIR}
COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR})
add_custom_command (OUTPUT test-home
- COMMAND mkdir -p $(TEST_HOME))
+ COMMAND mkdir -p $(TEST_HOME)/.config/dconf)
add_custom_target (
gschemas-compiled ALL DEPENDS gschemas.compiled
diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt
index 623fbc4..2bf808c 100644
--- a/tests/integration/CMakeLists.txt
+++ b/tests/integration/CMakeLists.txt
@@ -32,6 +32,7 @@ add_definitions(-DSOUND_SERVICE_BIN="${CMAKE_BINARY_DIR}/src/ayatana-indicator-s
-DTEST_SOUND="${CMAKE_SOURCE_DIR}/tests/integration/test-sound.wav"
-DQT_NO_KEYWORDS=1
-DXDG_DATA_DIRS="${XDG_DATA_DIRS}"
+ -DXDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}"
-DTEST_HOME="${TEST_HOME}"
)
diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp
index 46d6247..cdc1b2a 100644
--- a/tests/integration/indicator-sound-test-base.cpp
+++ b/tests/integration/indicator-sound-test-base.cpp
@@ -56,6 +56,7 @@ void IndicatorSoundTestBase::SetUp()
{
setenv("HOME", TEST_HOME, true);
setenv("XDG_DATA_DIRS", XDG_DATA_DIRS, true);
+ setenv("XDG_RUNTIME_DIR", XDG_RUNTIME_DIR, true);
setenv("DBUS_SYSTEM_BUS_ADDRESS", dbusTestRunner.systemBus().toStdString().c_str(), true);
setenv("DBUS_SESSION_BUS_ADDRESS", dbusTestRunner.sessionBus().toStdString().c_str(), true);
dbusMock.registerNotificationDaemon();