Merge lp:~3v1n0/indicator-sound/tests-environment-fixes into lp:indicator-sound

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 563
Merged at revision: 562
Proposed branch: lp:~3v1n0/indicator-sound/tests-environment-fixes
Merge into: lp:indicator-sound
Diff against target: 58 lines (+8/-19)
2 files modified
tests/integration/CMakeLists.txt (+6/-17)
tests/integration/indicator-sound-test-base.cpp (+2/-2)
To merge this branch: bzr merge lp:~3v1n0/indicator-sound/tests-environment-fixes
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+343741@code.launchpad.net

Commit message

tests, integration: set environment variables to work headless

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

good work Marco!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/integration/CMakeLists.txt'
--- tests/integration/CMakeLists.txt 2017-03-28 14:52:39 +0000
+++ tests/integration/CMakeLists.txt 2018-04-20 21:42:05 +0000
@@ -74,25 +74,14 @@
74 gmenuharness-shared74 gmenuharness-shared
75)75)
7676
77####77add_test(
78## When building under jenkins, pulseuadio fails to start as there is no78 integration-tests
79## /run/user tree, HOME directory is missing, and similar issues. So here79 integration-tests
80## we check that we are the jenkins user, and avoid the integration tests,
81## until such time in future when we can run these tests in some different
82## manner to avoid needing to run pulseaudio in this way.
83####
84execute_process(
85 COMMAND whoami
86 OUTPUT_VARIABLE TESTS_USER
87 OUTPUT_STRIP_TRAILING_WHITESPACE
88)80)
8981
90if(NOT "${TESTS_USER}" STREQUAL "jenkins")82set_tests_properties(integration-tests PROPERTIES ENVIRONMENT
91 add_test(83 "DISPLAY='';HOME=/tmp/indicator-test-home;"
92 integration-tests84)
93 integration-tests
94 )
95endif()
9685
97set(86set(
98 SET-VOLUME-SRC87 SET-VOLUME-SRC
9988
=== modified file 'tests/integration/indicator-sound-test-base.cpp'
--- tests/integration/indicator-sound-test-base.cpp 2016-03-16 14:00:47 +0000
+++ tests/integration/indicator-sound-test-base.cpp 2018-04-20 21:42:05 +0000
@@ -297,7 +297,7 @@
297 << QString("--load=module-null-sink sink_name=indicator_sound_test_speaker sink_properties=device.bus=%1").arg(getDevicePortString(speakerPort))297 << QString("--load=module-null-sink sink_name=indicator_sound_test_speaker sink_properties=device.bus=%1").arg(getDevicePortString(speakerPort))
298 << QString("--load=module-null-sink sink_name=indicator_sound_test_headphones sink_properties=device.bus=%1").arg(getDevicePortString(headphonesPort))298 << QString("--load=module-null-sink sink_name=indicator_sound_test_headphones sink_properties=device.bus=%1").arg(getDevicePortString(headphonesPort))
299 << QString("--load=module-null-sink sink_name=indicator_sound_test_mic")299 << QString("--load=module-null-sink sink_name=indicator_sound_test_mic")
300 << "--log-target=file:/tmp/pulse-daemon.log"300 << "--log-target=file:/tmp/indicator-sound-test-pulse-daemon-desktop.log"
301 << "--load=module-dbus-protocol"301 << "--load=module-dbus-protocol"
302 << "--load=module-native-protocol-tcp auth-ip-acl=127.0.0.1"302 << "--load=module-native-protocol-tcp auth-ip-acl=127.0.0.1"
303 ));303 ));
@@ -329,8 +329,8 @@
329 << QString("--load=module-null-sink sink_name=indicator_sound_test_speaker sink_properties=device.bus=%1").arg(getDevicePortString(speakerPort))329 << QString("--load=module-null-sink sink_name=indicator_sound_test_speaker sink_properties=device.bus=%1").arg(getDevicePortString(speakerPort))
330 << QString("--load=module-null-sink sink_name=indicator_sound_test_headphones sink_properties=device.bus=%1").arg(getDevicePortString(headphonesPort))330 << QString("--load=module-null-sink sink_name=indicator_sound_test_headphones sink_properties=device.bus=%1").arg(getDevicePortString(headphonesPort))
331 << QString("--load=module-null-sink sink_name=indicator_sound_test_mic")331 << QString("--load=module-null-sink sink_name=indicator_sound_test_mic")
332 << "--log-target=file:/tmp/pulse-daemon.log"
333 << QString("--load=module-stream-restore restore_device=false restore_muted=false fallback_table=%1").arg(STREAM_RESTORE_TABLE)332 << QString("--load=module-stream-restore restore_device=false restore_muted=false fallback_table=%1").arg(STREAM_RESTORE_TABLE)
333 << "--log-target=file:/tmp/indicator-sound-test-pulse-daemon-phone.log"
334 << "--load=module-dbus-protocol"334 << "--load=module-dbus-protocol"
335 << "--load=module-native-protocol-tcp auth-ip-acl=127.0.0.1"335 << "--load=module-native-protocol-tcp auth-ip-acl=127.0.0.1"
336 ));336 ));

Subscribers

People subscribed via source and target branches