aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-10 12:56:31 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-11-10 12:56:31 +0100
commit8a777394370b17a6bc9e4eab2cf13f1e0317384d (patch)
tree076891a8363835aa0720a45cef5e6b44f31cbe04 /tests
parentc6c9d5d998e63046d25707da573c7ace3a153793 (diff)
parent147d57e4b54fb59d5a956f8e3ea45748f973209e (diff)
downloadayatana-indicator-sound-8a777394370b17a6bc9e4eab2cf13f1e0317384d.tar.gz
ayatana-indicator-sound-8a777394370b17a6bc9e4eab2cf13f1e0317384d.tar.bz2
ayatana-indicator-sound-8a777394370b17a6bc9e4eab2cf13f1e0317384d.zip
Merge branch 'tari01-pr/drop-org-ayatana-sound'
Attributes GH PR #64: https://github.com/AyatanaIndicators/ayatana-indicator-sound/pull/64
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt5
-rw-r--r--tests/integration/indicator-sound-test-base.cpp10
2 files changed, 7 insertions, 8 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 75dab34..30b0e13 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -34,10 +34,7 @@ add_custom_target (
set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas")
set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas")
if (EXISTS /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml)
- set (SOUND_SCHEMA /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml)
add_definitions ( -DHAS_LOMIRI_SOUND_SCHEMA )
-else()
- set (SOUND_SCHEMA ${CMAKE_SOURCE_DIR}/data/org.ayatana.sound.gschema.xml)
endif()
add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}")
execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas
@@ -47,7 +44,7 @@ add_custom_command (OUTPUT gschemas.compiled
DEPENDS ${CMAKE_SOURCE_DIR}/data/org.ayatana.indicator.sound.gschema.xml
COMMAND mkdir -p ${SCHEMA_DIR}
COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/org.ayatana.indicator.sound.gschema.xml ${SCHEMA_DIR}
- COMMAND cp -f ${SOUND_SCHEMA} ${SCHEMA_DIR}
+ COMMAND test -e /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml && cp -f /usr/share/glib-2.0/schemas/com.lomiri.sound.gschema.xml ${SCHEMA_DIR} || echo "File does not exist" >&2
COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR})
add_custom_target (
diff --git a/tests/integration/indicator-sound-test-base.cpp b/tests/integration/indicator-sound-test-base.cpp
index 45e8acc..3217764 100644
--- a/tests/integration/indicator-sound-test-base.cpp
+++ b/tests/integration/indicator-sound-test-base.cpp
@@ -179,18 +179,20 @@ bool IndicatorSoundTestBase::clearGSettingsPlayers()
bool IndicatorSoundTestBase::resetAllowAmplifiedVolume()
{
+#if HAS_LOMIRI_SOUND_SCHEMA
QProcess proc;
proc.start("gsettings", QStringList()
<< "reset"
-#ifdef HAS_LOMIRI_SOUND_SCHEMA
+
<< "com.lomiri.sound"
-#else
- << "org.ayatana.sound"
-#endif
+
<< "allow-amplified-volume");
return runProcess(proc);
+#else
+ return TRUE;
+#endif
}
bool IndicatorSoundTestBase::runProcess(QProcess& proc)