on xenial help sign in
merge fake/mock qml plugins as we don't really distinguish between mocks and fakes correctly and this separation was just confusing
73354fdMichael Zanetti
tests/mocks/CMakeLists.txt+2
@@ -1,2 +1,4 @@
1add_subdirectory(LightDM)
1add_subdirectory(LightDM)
2add_subdirectory(Ubuntu)
2add_subdirectory(Ubuntu)
3+add_subdirectory(Unity)
4+add_subdirectory(HudClient)
tests/qmltests/plugins/HudClient/CMakeLists.txt → tests/mocks/HudClient/CMakeLists.txtrenamed

The content is the same.

tests/qmltests/plugins/HudClient/fake_hud_plugin.cpp → tests/mocks/HudClient/fake_hud_plugin.cpprenamed

The content is the same.

tests/qmltests/plugins/HudClient/fake_hud_plugin.h → tests/mocks/HudClient/fake_hud_plugin.hrenamed

The content is the same.

tests/qmltests/plugins/HudClient/fake_libhud_client.cpp → tests/mocks/HudClient/fake_libhud_client.cpprenamed

The content is the same.

tests/qmltests/plugins/HudClient/libhud_client_stub.cpp → tests/mocks/HudClient/libhud_client_stub.cpprenamed

The content is the same.

tests/qmltests/plugins/HudClient/libhud_client_stub.h → tests/mocks/HudClient/libhud_client_stub.hrenamed

The content is the same.

tests/qmltests/plugins/HudClient/qmldir → tests/mocks/HudClient/qmldirrenamed

The content is the same.

tests/mocks/Ubuntu/CMakeLists.txt+1
@@ -1 +1,2 @@
1add_subdirectory(Application)
1add_subdirectory(Application)
2+add_subdirectory(ChewieUI)
tests/qmltests/plugins/Ubuntu/ChewieUI/CMakeLists.txt → tests/mocks/Ubuntu/ChewieUI/CMakeLists.txtrenamed

The content is the same.

tests/qmltests/plugins/Ubuntu/ChewieUI/fake_chewie_plugin.cpp → tests/mocks/Ubuntu/ChewieUI/fake_chewie_plugin.cpprenamed

The content is the same.

tests/qmltests/plugins/Ubuntu/ChewieUI/fake_chewie_plugin.h → tests/mocks/Ubuntu/ChewieUI/fake_chewie_plugin.hrenamed

The content is the same.

tests/qmltests/plugins/Ubuntu/ChewieUI/fake_pluginmodel.cpp → tests/mocks/Ubuntu/ChewieUI/fake_pluginmodel.cpprenamed

The content is the same.

tests/qmltests/plugins/Ubuntu/ChewieUI/fake_pluginmodel.h → tests/mocks/Ubuntu/ChewieUI/fake_pluginmodel.hrenamed

The content is the same.

tests/qmltests/plugins/Ubuntu/ChewieUI/qmldir → tests/mocks/Ubuntu/ChewieUI/qmldirrenamed

The content is the same.

tests/qmltests/plugins/Unity/CMakeLists.txt → tests/mocks/Unity/CMakeLists.txtrenamed

The content is the same.

tests/qmltests/plugins/Unity/Notifications/notification.js → tests/mocks/Unity/Notifications/notification.jsrenamed

The content is the same.

tests/qmltests/plugins/Unity/Notifications/qmldir → tests/mocks/Unity/Notifications/qmldirrenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_launchermodel.cpp → tests/mocks/Unity/fake_launchermodel.cpprenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_launchermodel.h → tests/mocks/Unity/fake_launchermodel.hrenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_scope.cpp → tests/mocks/Unity/fake_scope.cpprenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_scope.h → tests/mocks/Unity/fake_scope.hrenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_scopes.cpp → tests/mocks/Unity/fake_scopes.cpprenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_scopes.h → tests/mocks/Unity/fake_scopes.hrenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_unity_plugin.cpp → tests/mocks/Unity/fake_unity_plugin.cpprenamed

The content is the same.

tests/qmltests/plugins/Unity/fake_unity_plugin.h → tests/mocks/Unity/fake_unity_plugin.hrenamed

The content is the same.

tests/qmltests/plugins/Unity/qmldir → tests/mocks/Unity/qmldirrenamed

The content is the same.

tests/qmltests/CMakeLists.txt+6−8
@@ -1,11 +1,9 @@
1# add_qml_test macro
1# add_qml_test macro
2include(QmlTest)
2include(QmlTest)
3
3
4−add_subdirectory(plugins)
5−
6set(qmltest_DEFAULT_IMPORT_PATHS
4set(qmltest_DEFAULT_IMPORT_PATHS
7− ${CMAKE_CURRENT_BINARY_DIR}/plugins
8 ${CMAKE_BINARY_DIR}/tests/utils/modules
5 ${CMAKE_BINARY_DIR}/tests/utils/modules
6+ ${CMAKE_BINARY_DIR}/tests/mocks
9)
7)
10
8
11set(qmltest_DEFAULT_TARGETS qmlunittests)
9set(qmltest_DEFAULT_TARGETS qmlunittests)
@@ -37,7 +35,7 @@ add_qml_test(Components Stage IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS}
37 ${CMAKE_BINARY_DIR}/plugins)
35 ${CMAKE_BINARY_DIR}/plugins)
38add_qml_test(Components Tile)
36add_qml_test(Components Tile)
39add_qml_test(Components PageHeader)
37add_qml_test(Components PageHeader)
40−add_qml_test(Dash Dash IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
38+add_qml_test(Dash Dash IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
41add_qml_test(Dash DashBar IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
39add_qml_test(Dash DashBar IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
42add_qml_test(Dash DashContent IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS})
40add_qml_test(Dash DashContent IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS})
43add_qml_test(Dash DashPreview)
41add_qml_test(Dash DashPreview)
@@ -46,13 +44,13 @@ add_qml_test(Dash ScopeView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CUR
46add_qml_test(Dash FilterGrids IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins
44add_qml_test(Dash FilterGrids IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins
47 ${CMAKE_BINARY_DIR}/tests/mocks)
45 ${CMAKE_BINARY_DIR}/tests/mocks)
48add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
46add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
49−add_qml_test(Greeter Lockscreen IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_BINARY_DIR}/tests/mocks
47+add_qml_test(Greeter Lockscreen IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
50 PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
48 PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
51−add_qml_test(Greeter Tablet IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_BINARY_DIR}/tests/mocks
49+add_qml_test(Greeter Tablet IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
52 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
50 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
53−add_qml_test(Greeter Phone IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_BINARY_DIR}/tests/mocks
51+add_qml_test(Greeter Phone IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
54 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
52 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/single")
55−add_qml_test(Greeter Infographics IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_BINARY_DIR}/tests/mocks
53+add_qml_test(Greeter Infographics IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
56 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
54 ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
57add_qml_test(Hud Hud)
55add_qml_test(Hud Hud)
58add_qml_test(Hud Result)
56add_qml_test(Hud Result)
tests/qmltests/plugins/CMakeLists.txtdeleted−3
@@ -1,3 +0,0 @@
1−add_subdirectory(HudClient)
2−add_subdirectory(Ubuntu)
3−add_subdirectory(Unity)
tests/qmltests/plugins/Ubuntu/CMakeLists.txtdeleted−1
@@ -1 +0,0 @@
1−add_subdirectory(ChewieUI)