on xenial help sign in
Some small changes that don't fix testing still
09bf600Josh Arenson
qml/Greeter/TheLightDM.qml+3
@@ -29,6 +29,9 @@ Loader {
29 property var infographic: d.valid ? loader.item.infographic : null
29 property var infographic: d.valid ? loader.item.infographic : null
30 property var users: d.valid ? loader.item.users : null
30 property var users: d.valid ? loader.item.users : null
31 property var userRoles: d.valid ? loader.item.userRoles : null
31 property var userRoles: d.valid ? loader.item.userRoles : null
32+
33+ // This trickery handles cases where applicationArguments aren't provided
34+ // such as during testing
32 property var fullLightDM: {
35 property var fullLightDM: {
33 if (typeof applicationArguments !== "undefined") {
36 if (typeof applicationArguments !== "undefined") {
34 if (applicationArguments.mode === "greeter") {
37 if (applicationArguments.mode === "greeter") {
tests/CMakeLists.txt+3−3
@@ -41,7 +41,7 @@ macro(unity8_parse_arguments)
41 if(U8TEST_LIGHTDM)
41 if(U8TEST_LIGHTDM)
42 list(APPEND ld_paths
42 list(APPEND ld_paths
43 ${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics
43 ${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics
44− ${CMAKE_BINARY_DIR}/tests/mocks/IntegratedLightDM/liblightdm
44+ ${CMAKE_BINARY_DIR}/tests/mocks/LightDM/liblightdm
45 )
45 )
46 endif()
46 endif()
47
47
@@ -123,6 +123,6 @@ endfunction()
123
123
124# Actual test definitions
124# Actual test definitions
125add_subdirectory(libs)
125add_subdirectory(libs)
126−#add_subdirectory(plugins)
126+add_subdirectory(plugins)
127add_subdirectory(qmltests)
127add_subdirectory(qmltests)
128−#add_subdirectory(whitespace)
128+add_subdirectory(whitespace)
tests/mocks/LightDM/CMakeLists.txt+1−1
@@ -30,7 +30,7 @@ add_library(MockLightDM-qml MODULE
30 ${QMLPLUGIN_SRC}
30 ${QMLPLUGIN_SRC}
31 )
31 )
32
32
33−# We want to link to liblightdm-qt5-2, but we don't want to depend on it being
33+# We want to link to liblightdm-qt5-3, but we don't want to depend on it being
34# installed on the system. So we make sure we link to our full fake version
34# installed on the system. So we make sure we link to our full fake version
35# At run time, we can point to whichever version we happen to be using via
35# At run time, we can point to whichever version we happen to be using via
36# LD_LIBRARY_PATH.
36# LD_LIBRARY_PATH.
tests/plugins/LightDM/CMakeLists.txt+1−1
@@ -55,7 +55,7 @@ add_dependencies(GreeterUsersModelTestExec MockLightDM)
55qt5_use_modules(GreeterUsersModelTestExec Core Test)
55qt5_use_modules(GreeterUsersModelTestExec Core Test)
56target_link_libraries(GreeterUsersModelTestExec
56target_link_libraries(GreeterUsersModelTestExec
57 -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/liblightdm
57 -L${CMAKE_BINARY_DIR}/tests/mocks/LightDM/liblightdm
58− -llightdm-qt5-2
58+ -llightdm-qt5-3
59 )
59 )
60target_include_directories(GreeterUsersModelTestExec PUBLIC
60target_include_directories(GreeterUsersModelTestExec PUBLIC
61 ${CMAKE_SOURCE_DIR}/plugins/LightDM
61 ${CMAKE_SOURCE_DIR}/plugins/LightDM
tests/qmltests/Greeter/tst_Greeter.qml+1−1
@@ -21,7 +21,7 @@ import "../../../qml/Greeter"
21import Ubuntu.Components 0.1
21import Ubuntu.Components 0.1
22import AccountsService 0.1
22import AccountsService 0.1
23import GSettings 1.0
23import GSettings 1.0
24−import LightDM 0.1 // This is the mock
24+import LightDM 0.1 as LightDM // This is the mock
25import Unity.Test 0.1 as UT
25import Unity.Test 0.1 as UT
26
26
27Item {
27Item {