From b0ac3df28f96e54d0adca7ba32a4993faffc44d2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 28 Oct 2014 18:01:35 -0500 Subject: Setup to getting something to compile and pass. Next steps needed. --- tests/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ae68c45..1eec3fd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -181,3 +181,18 @@ add_test(greeter-list-test-iterator greeter-list-test --gtest_filter=GreeterListTest.BasicIterator ) +########################### +# Indicator Test +########################### + +add_executable (indicator-test indicator-test.cc) +target_link_libraries ( + indicator-test + gtest + ${SOUNDSERVICE_LIBRARIES} + ${TEST_LIBRARIES} +) + +# Split tests to work around libaccountservice sucking +add_test(indicator-test indicator-test) + -- cgit v1.2.3 From 642c5d77b0d2fb42a6c9205e50592624542a813f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 28 Oct 2014 18:10:50 -0500 Subject: Connect to binary and real name --- tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1eec3fd..58ecd3a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -185,6 +185,9 @@ add_test(greeter-list-test-iterator # Indicator Test ########################### +add_definitions( + -DINDICATOR_SOUND_SERVICE_BINARY="${CMAKE_BINARY_DIR}/src/indicator-sound-service" +) add_executable (indicator-test indicator-test.cc) target_link_libraries ( indicator-test -- cgit v1.2.3 From b70244a3e24cc666a640445dbc190db8a44f556c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 11 Nov 2014 18:18:08 -0600 Subject: Splitting out the tests --- tests/CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 58ecd3a..f588d12 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -197,5 +197,12 @@ target_link_libraries ( ) # Split tests to work around libaccountservice sucking -add_test(indicator-test indicator-test) - +add_test(indcator-test-phone-menu + indicator-test --gtest_filter=IndicatorTest.PhoneMenu +) +add_test(indcator-test-desktop-menu + indicator-test --gtest_filter=IndicatorTest.DesktopMenu +) +add_test(indcator-test-silent-actions + indicator-test --gtest_filter=IndicatorTest.SilentActions +) -- cgit v1.2.3 From e4ee5134da0cf9656db9ea201f2b7b53e92ac1b7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 29 Jan 2015 20:57:16 -0600 Subject: Setup the PA mock as part of the indicator test --- tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c1b4afc..d18e2dd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -92,6 +92,8 @@ add_library( pa-mock.cpp ) +target_link_libraries (pulse-mock ${PULSEAUDIO_LIBRARIES}) + ########################### # Name Watch Test ########################### @@ -213,6 +215,7 @@ add_test(greeter-list-test-iterator add_definitions( -DINDICATOR_SOUND_SERVICE_BINARY="${CMAKE_BINARY_DIR}/src/indicator-sound-service" + -DPA_MOCK_LIB="${CMAKE_CURRENT_BINARY_DIR}/libpulse-mock.so" ) add_executable (indicator-test indicator-test.cc) target_link_libraries ( -- cgit v1.2.3 From 91f42ea2266bd4201c1a9f0a9d7e47d431c601c3 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 2 Feb 2015 08:13:10 -0600 Subject: We're not using libaccountservice on this side of things, so we don't need to split --- tests/CMakeLists.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d18e2dd..bc2df0d 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -226,12 +226,6 @@ target_link_libraries ( ) # Split tests to work around libaccountservice sucking -add_test(indcator-test-phone-menu - indicator-test --gtest_filter=IndicatorTest.PhoneMenu -) -add_test(indcator-test-desktop-menu - indicator-test --gtest_filter=IndicatorTest.DesktopMenu -) -add_test(indcator-test-silent-actions - indicator-test --gtest_filter=IndicatorTest.SilentActions +add_test(indcator-test + indicator-test ) -- cgit v1.2.3 From 363a5d1ae24d58d294d8806930cf788879a6f73a Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 4 Feb 2015 11:43:08 -0600 Subject: Compile GSettings schema and use the memory backend --- tests/CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bc2df0d..d9bfe0b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,6 +10,28 @@ add_library (gtest STATIC ${GTEST_SOURCE_DIR}/gtest_main.cc) target_link_libraries(gtest ${GTEST_LIBS}) +########################### +# GSettings Schema +########################### + +# build the necessary schemas +set_directory_properties (PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES gschemas.compiled) +set_source_files_properties (gschemas.compiled GENERATED) + +# GSettings: +# compile the indicator-sound schema into a gschemas.compiled file in this directory, +# and help the tests to find that file by setting -DSCHEMA_DIR +set (SCHEMA_DIR ${CMAKE_CURRENT_BINARY_DIR}) +add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") +execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas + OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE + OUTPUT_STRIP_TRAILING_WHITESPACE) +add_custom_command (OUTPUT gschemas.compiled + DEPENDS ${CMAKE_BINARY_DIR}/data/com.canonical.indicator.sound.gschema.xml + COMMAND cp -f ${CMAKE_BINARY_DIR}/data/*gschema.xml ${SCHEMA_DIR} + COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) + ########################### # Vala Mocks ########################### -- cgit v1.2.3 From 23bdec1dd9169e8dda04ec0587db909472acc6c1 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 4 Feb 2015 13:36:53 -0600 Subject: Set build dependencies to compile the schemas --- tests/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/CMakeLists.txt') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d9bfe0b..38a76ae 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -22,14 +22,15 @@ set_source_files_properties (gschemas.compiled GENERATED) # GSettings: # compile the indicator-sound schema into a gschemas.compiled file in this directory, # and help the tests to find that file by setting -DSCHEMA_DIR -set (SCHEMA_DIR ${CMAKE_CURRENT_BINARY_DIR}) +set (SCHEMA_DIR "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas") add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE) add_custom_command (OUTPUT gschemas.compiled - DEPENDS ${CMAKE_BINARY_DIR}/data/com.canonical.indicator.sound.gschema.xml - COMMAND cp -f ${CMAKE_BINARY_DIR}/data/*gschema.xml ${SCHEMA_DIR} + DEPENDS ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.sound.gschema.xml + COMMAND mkdir -p ${SCHEMA_DIR} + COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/*gschema.xml ${SCHEMA_DIR} COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) ########################### @@ -239,7 +240,7 @@ add_definitions( -DINDICATOR_SOUND_SERVICE_BINARY="${CMAKE_BINARY_DIR}/src/indicator-sound-service" -DPA_MOCK_LIB="${CMAKE_CURRENT_BINARY_DIR}/libpulse-mock.so" ) -add_executable (indicator-test indicator-test.cc) +add_executable (indicator-test indicator-test.cc gschemas.compiled) target_link_libraries ( indicator-test gtest -- cgit v1.2.3