Merge lp:~khurshid-alam/unity-api/fix-build-cosmic into lp:unity-api

Proposed by Khurshid Alam on 2018-10-04
Status: Merged
Merged at revision: 285
Proposed branch: lp:~khurshid-alam/unity-api/fix-build-cosmic
Merge into: lp:unity-api
Diff against target: 225 lines (+33/-19)
13 files modified
debian/control (+2/-2)
include/unity/util/GlibMemory.h (+5/-0)
src/unity/util/FileIO.cpp (+1/-0)
src/unity/util/internal/DaemonImpl.cpp (+1/-0)
test/gtest/unity/util/CMakeLists.txt (+3/-3)
test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp (+1/-0)
test/headers/CMakeLists.txt (+7/-4)
test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt (+2/-2)
test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt (+3/-2)
test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt (+2/-2)
test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt (+3/-1)
test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt (+2/-2)
test/qmltest/modules/TestUtil/CMakeLists.txt (+1/-1)
To merge this branch: bzr merge lp:~khurshid-alam/unity-api/fix-build-cosmic
Reviewer Review Type Date Requested Status
Jeremy Bicha 2018-10-04 Needs Fixing on 2018-10-14
Review via email: mp+356161@code.launchpad.net

Commit message

* Satisfy build against >= gcc-7

* Only add internal header tests if exists.

Only add a test for standalone compilation of internal include
directories if the directory exists on disk.

https://github.com/ubports/unity-api/commit/89b77f91f746cca9aa71f1e44a896e51f5b2a9fd

* Fix autoclean conflict with new glib.

The new glib 2.57.2 version introduces reference counted strings, which
causes a redefinition scenario with the autocleanup of gchar here. So,
only include this definition when building against older glib versions.

https://github.com/ubports/unity-api/commit/9e7c45340805532faf4078012b17c8719677714e

* Raplace transitional dummy packages qtquick2 and qttest

* Disable memory tests for now to satisfy build against glib >= 2.58.

Description of the change

I disabled the memory tests as I was getting sigtrap against GLib >= 2.58. It compiles fine in bionic. This is not so serious as none of the unity7 components depend on unity-api.

If you are ok with this please review and merge.

To post a comment you must log in.
292. By Khurshid Alam on 2018-10-04

Remove popularity contest. Not required in this context.

Jeremy Bicha (jbicha) wrote :

Please clean up your commits and force push. (In particular, the commit history doesn't need the popularity contest addition and removal.)

review: Needs Fixing
Jeremy Bicha (jbicha) wrote :

sil2100 said he was going to handle this.

Ɓukasz Zemczak (sil2100) wrote :

Merged and released.

Khurshid Alam (khurshid-alam) wrote :

Thanks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2017-03-25 22:40:06 +0000
+++ debian/control 2018-10-04 23:21:00 +0000
@@ -21,8 +21,8 @@
21 qtbase5-dev (>= 5.5),21 qtbase5-dev (>= 5.5),
22 qtdeclarative5-dev,22 qtdeclarative5-dev,
23 qtdeclarative5-dev-tools,23 qtdeclarative5-dev-tools,
24 qtdeclarative5-qtquick2-plugin,24 qml-module-qtquick2,
25 qtdeclarative5-test-plugin,25 qml-module-qttest,
26Standards-Version: 3.9.426Standards-Version: 3.9.4
27Homepage: https://launchpad.net/unity-api27Homepage: https://launchpad.net/unity-api
28# If you aren't a member of ~unity-team but need to upload28# If you aren't a member of ~unity-team but need to upload
2929
=== removed directory 'include/unity/api/internal'
=== removed directory 'include/unity/internal'
=== modified file 'include/unity/util/GlibMemory.h'
--- include/unity/util/GlibMemory.h 2017-04-04 09:27:33 +0000
+++ include/unity/util/GlibMemory.h 2018-10-04 23:21:00 +0000
@@ -210,7 +210,12 @@
210/**210/**
211 * Manually add extra definitions for gchar* and gchar**211 * Manually add extra definitions for gchar* and gchar**
212 */212 */
213#if GLIB_CHECK_VERSION(2, 57, 2)
214typedef GRefStringSPtr gcharSPtr;
215typedef GRefStringUPtr gcharUPtr;
216#else
213UNITY_UTIL_DEFINE_GLIB_SMART_POINTERS(gchar, g_free)217UNITY_UTIL_DEFINE_GLIB_SMART_POINTERS(gchar, g_free)
218#endif
214typedef gchar* gcharv;219typedef gchar* gcharv;
215UNITY_UTIL_DEFINE_GLIB_SMART_POINTERS(gcharv, g_strfreev)220UNITY_UTIL_DEFINE_GLIB_SMART_POINTERS(gcharv, g_strfreev)
216221
217222
=== modified file 'src/unity/util/FileIO.cpp'
--- src/unity/util/FileIO.cpp 2013-06-26 23:47:34 +0000
+++ src/unity/util/FileIO.cpp 2018-10-04 23:21:00 +0000
@@ -26,6 +26,7 @@
26#include <unistd.h>26#include <unistd.h>
27#include <string.h>27#include <string.h>
28#include <sys/stat.h>28#include <sys/stat.h>
29#include <functional>
2930
30using namespace std;31using namespace std;
3132
3233
=== modified file 'src/unity/util/internal/DaemonImpl.cpp'
--- src/unity/util/internal/DaemonImpl.cpp 2013-06-26 23:47:34 +0000
+++ src/unity/util/internal/DaemonImpl.cpp 2018-10-04 23:21:00 +0000
@@ -30,6 +30,7 @@
30#include <cassert>30#include <cassert>
31#include <sstream>31#include <sstream>
32#include <vector>32#include <vector>
33#include <functional>
3334
34using namespace std;35using namespace std;
3536
3637
=== modified file 'test/gtest/unity/util/CMakeLists.txt'
--- test/gtest/unity/util/CMakeLists.txt 2017-04-04 09:37:22 +0000
+++ test/gtest/unity/util/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -1,9 +1,9 @@
1add_subdirectory(Daemon)1add_subdirectory(Daemon)
2add_subdirectory(DefinesPtrs)2add_subdirectory(DefinesPtrs)
3add_subdirectory(FileIO)3add_subdirectory(FileIO)
4add_subdirectory(GioMemory)4#add_subdirectory(GioMemory)
5add_subdirectory(GlibMemory)5#add_subdirectory(GlibMemory)
6add_subdirectory(GObjectMemory)6#add_subdirectory(GObjectMemory)
7add_subdirectory(IniParser)7add_subdirectory(IniParser)
8add_subdirectory(ResourcePtr)8add_subdirectory(ResourcePtr)
9add_subdirectory(SnapPath)9add_subdirectory(SnapPath)
1010
=== modified file 'test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp'
--- test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp 2013-06-26 23:47:34 +0000
+++ test/gtest/unity/util/ResourcePtr/ResourcePtr_test.cpp 2018-10-04 23:21:00 +0000
@@ -21,6 +21,7 @@
21#include <unity/util/ResourcePtr.h>21#include <unity/util/ResourcePtr.h>
2222
23#include <set>23#include <set>
24#include <functional>
2425
25using namespace std;26using namespace std;
26using namespace unity;27using namespace unity;
2728
=== modified file 'test/headers/CMakeLists.txt'
--- test/headers/CMakeLists.txt 2017-03-25 22:40:06 +0000
+++ test/headers/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -28,10 +28,13 @@
28 ${CMAKE_CURRENT_SOURCE_DIR}/compile_headers.py28 ${CMAKE_CURRENT_SOURCE_DIR}/compile_headers.py
29 ${public_inc_dir} ${CMAKE_CXX_COMPILER} "-I${root_inc_dir} -I${public_inc_dir} ${CMAKE_CXX_FLAGS}" "--exclusions" ${exclusions})29 ${public_inc_dir} ${CMAKE_CXX_COMPILER} "-I${root_inc_dir} -I${public_inc_dir} ${CMAKE_CXX_FLAGS}" "--exclusions" ${exclusions})
3030
31 # Test that each internal header compiles stand-alone.31 # Test that each internal header compiles stand-alone,
32 add_test(stand-alone-${location}-internal-headers32 # if internal headers exist.
33 ${CMAKE_CURRENT_SOURCE_DIR}/compile_headers.py33 if(EXISTS ${internal_inc_dir})
34 ${internal_inc_dir} ${CMAKE_CXX_COMPILER} "-I${root_inc_dir} -I${internal_inc_dir} ${CMAKE_CXX_FLAGS}" "--exclusions" ${exclusions})34 add_test(stand-alone-${location}-internal-headers
35 ${CMAKE_CURRENT_SOURCE_DIR}/compile_headers.py
36 ${internal_inc_dir} ${CMAKE_CXX_COMPILER} "-I${root_inc_dir} -I${internal_inc_dir} ${CMAKE_CXX_FLAGS}" "--exclusions" ${exclusions})
37 endif(EXISTS ${internal_inc_dir})
3538
36 # Test that no public header includes an internal header39 # Test that no public header includes an internal header
37 add_test(clean-public-${location}-headers ${CMAKE_CURRENT_SOURCE_DIR}/check_public_headers.py ${public_inc_dir})40 add_test(clean-public-${location}-headers ${CMAKE_CURRENT_SOURCE_DIR}/check_public_headers.py ${public_inc_dir})
3841
=== modified file 'test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt'
--- test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt 2014-09-03 22:59:26 +0000
+++ test/qmltest/mocks/plugins/Unity/Application/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -20,7 +20,7 @@
2020
21add_library(ApplicationMocks SHARED ${ApplicationMocks_SOURCES})21add_library(ApplicationMocks SHARED ${ApplicationMocks_SOURCES})
2222
23qt5_use_modules(ApplicationMocks Core Gui)23target_link_libraries(ApplicationMocks Qt5::Core Qt5::Gui)
2424
25set(TestApplicationPlugin_SOURCES25set(TestApplicationPlugin_SOURCES
26 TestApplicationPlugin.cpp26 TestApplicationPlugin.cpp
@@ -28,7 +28,7 @@
2828
29add_library(TestApplicationPlugin MODULE ${TestApplicationPlugin_SOURCES})29add_library(TestApplicationPlugin MODULE ${TestApplicationPlugin_SOURCES})
3030
31qt5_use_modules(TestApplicationPlugin Core Gui Quick)31target_link_libraries(TestApplicationPlugin Qt5::Core Qt5::Gui Qt5::Quick)
3232
33target_link_libraries(TestApplicationPlugin ApplicationMocks)33target_link_libraries(TestApplicationPlugin ApplicationMocks)
3434
3535
=== modified file 'test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt'
--- test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt 2016-11-10 18:13:30 +0000
+++ test/qmltest/mocks/plugins/Unity/Launcher/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -29,7 +29,8 @@
2929
30add_library(LauncherMocks SHARED ${LauncherMocks_SOURCES})30add_library(LauncherMocks SHARED ${LauncherMocks_SOURCES})
3131
32qt5_use_modules(LauncherMocks Core Gui)32#find_package(Qt5Gui REQUIRED)
33target_link_libraries(LauncherMocks Qt5::Core Qt5::Gui)
3334
34set(TestLauncherPlugin_SOURCES35set(TestLauncherPlugin_SOURCES
35 TestLauncherPlugin.cpp36 TestLauncherPlugin.cpp
@@ -37,7 +38,7 @@
3738
38add_library(TestLauncherPlugin MODULE ${TestLauncherPlugin_SOURCES})39add_library(TestLauncherPlugin MODULE ${TestLauncherPlugin_SOURCES})
3940
40qt5_use_modules(TestLauncherPlugin Core Quick)41target_link_libraries(TestLauncherPlugin Qt5::Core Qt5::Quick)
4142
42target_link_libraries(TestLauncherPlugin LauncherMocks)43target_link_libraries(TestLauncherPlugin LauncherMocks)
4344
4445
=== modified file 'test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt'
--- test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt 2013-05-14 08:12:15 +0000
+++ test/qmltest/mocks/plugins/Unity/Notifications/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -21,7 +21,7 @@
2121
22add_library(NotificationsMocks SHARED ${NotificationsMocks_SOURCES})22add_library(NotificationsMocks SHARED ${NotificationsMocks_SOURCES})
2323
24qt5_use_modules(NotificationsMocks Core)24target_link_libraries(NotificationsMocks Qt5::Core)
2525
26set(TestNotificationsPlugin_SOURCES26set(TestNotificationsPlugin_SOURCES
27 TestNotificationsPlugin.cpp27 TestNotificationsPlugin.cpp
@@ -29,7 +29,7 @@
2929
30add_library(TestNotificationsPlugin MODULE ${TestNotificationsPlugin_SOURCES})30add_library(TestNotificationsPlugin MODULE ${TestNotificationsPlugin_SOURCES})
3131
32qt5_use_modules(TestNotificationsPlugin Core Quick)32target_link_libraries(TestNotificationsPlugin Qt5::Core Qt5::Quick)
3333
34target_link_libraries(TestNotificationsPlugin NotificationsMocks)34target_link_libraries(TestNotificationsPlugin NotificationsMocks)
3535
3636
=== modified file 'test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt'
--- test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt 2013-05-14 08:12:15 +0000
+++ test/qmltest/mocks/plugins/Unity/Notifications/Mocks/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -4,7 +4,9 @@
44
5add_library(MockNotificationsPlugin MODULE ${MockNotificationsPlugin_SOURCES})5add_library(MockNotificationsPlugin MODULE ${MockNotificationsPlugin_SOURCES})
66
7qt5_use_modules(MockNotificationsPlugin Core Quick)7#find_package(Qt5Core REQUIRED)
8#find_package(Qt5Quick REQUIRED)
9target_link_libraries(MockNotificationsPlugin Qt5::Core Qt5::Quick)
810
9target_link_libraries(MockNotificationsPlugin NotificationsMocks)11target_link_libraries(MockNotificationsPlugin NotificationsMocks)
1012
1113
=== modified file 'test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt'
--- test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2016-03-10 10:26:13 +0000
+++ test/qmltest/mocks/plugins/Unity/Scopes/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -39,7 +39,7 @@
3939
40add_library(ScopesMocks SHARED ${ScopesMocks_SOURCES})40add_library(ScopesMocks SHARED ${ScopesMocks_SOURCES})
4141
42qt5_use_modules(ScopesMocks Core)42target_link_libraries(ScopesMocks Qt5::Core)
4343
44set(TestScopesPlugin_SOURCES44set(TestScopesPlugin_SOURCES
45 TestScopesPlugin.cpp45 TestScopesPlugin.cpp
@@ -47,7 +47,7 @@
4747
48add_library(TestScopesPlugin MODULE ${TestScopesPlugin_SOURCES})48add_library(TestScopesPlugin MODULE ${TestScopesPlugin_SOURCES})
4949
50qt5_use_modules(TestScopesPlugin Core Quick)50target_link_libraries(TestScopesPlugin Qt5::Core Qt5::Quick)
5151
52target_link_libraries(TestScopesPlugin ScopesMocks)52target_link_libraries(TestScopesPlugin ScopesMocks)
5353
5454
=== modified file 'test/qmltest/modules/TestUtil/CMakeLists.txt'
--- test/qmltest/modules/TestUtil/CMakeLists.txt 2014-09-12 16:59:50 +0000
+++ test/qmltest/modules/TestUtil/CMakeLists.txt 2018-10-04 23:21:00 +0000
@@ -15,7 +15,7 @@
1515
16add_library(TestUtilQml MODULE ${TestUtilQML_SOURCES})16add_library(TestUtilQml MODULE ${TestUtilQML_SOURCES})
1717
18qt5_use_modules(TestUtilQml Core Quick)18target_link_libraries(TestUtilQml Qt5::Core Qt5::Quick)
1919
20# copy qmldir file into build directory for shadow builds20# copy qmldir file into build directory for shadow builds
21file(GLOB QML_JS_FILES qmldir *.js *.qml)21file(GLOB QML_JS_FILES qmldir *.js *.qml)

Subscribers

People subscribed via source and target branches

to all changes: