Merge lp:~dandrader/unity8/ownMockMirSurface into lp:unity8

Proposed by Daniel d'Andrada on 2016-02-17
Status: Merged
Approved by: Michael Zanetti on 2016-02-17
Approved revision: 2202
Merged at revision: 2244
Proposed branch: lp:~dandrader/unity8/ownMockMirSurface
Merge into: lp:unity8
Diff against target: 20 lines (+3/-0)
1 file modified
tests/mocks/Unity/Application/MirSurface.cpp (+3/-0)
To merge this branch: bzr merge lp:~dandrader/unity8/ownMockMirSurface
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2016-02-17
Michael Zanetti (community) 2016-02-17 Approve on 2016-02-17
Unity8 CI Bot continuous-integration Approve on 2016-02-17
Review via email: mp+286298@code.launchpad.net

Commit Message

Ensure the QML engine doesn't delete our mock MirSurfaces on its own.

That would cause some hard-to-track failures in QML test runs.

Description of the Change

* Are there any related MPs required for this MP to build/function as expected? Please list.
No

* Did you perform an exploratory manual test run of your code change and any related functionality?
Not applicable

* Did you make sure that your branch does not contain spurious tags?
Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
Not applicable

* If you changed the UI, has there been a design review?
Not applicable

To post a comment you must log in.
Michael Zanetti (mzanetti) wrote :

fails to build here. probably forgot some include

/home/micha/Develop/reviews/ownMockMirSurface/tests/mocks/Unity/Application/MirSurface.cpp: In constructor ‘MirSurface::MirSurface(const QString&, Mir::Type, Mir::State, const QUrl&, const QUrl&)’:
/home/micha/Develop/reviews/ownMockMirSurface/tests/mocks/Unity/Application/MirSurface.cpp:41:5: error: ‘QQmlEngine’ has not been declared
     QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
     ^
/home/micha/Develop/reviews/ownMockMirSurface/tests/mocks/Unity/Application/MirSurface.cpp:41:42: error: ‘QQmlEngine’ has not been declared
     QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);

review: Needs Fixing
2202. By Daniel d'Andrada on 2016-02-17

Add missing #include

Daniel d'Andrada (dandrader) wrote :

On 17/02/2016 10:37, Michael Zanetti wrote:
> Review: Needs Fixing
>
> fails to build here. probably forgot some include
>
> /home/micha/Develop/reviews/ownMockMirSurface/tests/mocks/Unity/Application/MirSurface.cpp: In constructor ‘MirSurface::MirSurface(const QString&, Mir::Type, Mir::State, const QUrl&, const QUrl&)’:
> /home/micha/Develop/reviews/ownMockMirSurface/tests/mocks/Unity/Application/MirSurface.cpp:41:5: error: ‘QQmlEngine’ has not been declared
> QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
> ^
> /home/micha/Develop/reviews/ownMockMirSurface/tests/mocks/Unity/Application/MirSurface.cpp:41:42: error: ‘QQmlEngine’ has not been declared
> QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
>

Fixed. Was copy-pasting this from my other branch (surface-based WM)...

Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2202
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/398/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/536
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay/175
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial/175
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/559
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/577
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/577
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/573
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/573/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/573
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial/573/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/573
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/573/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/573
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial/573/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/573
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/573/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/573
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial/573/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-1-ci/398/rebuild

review: Approve (continuous-integration)
Michael Zanetti (mzanetti) wrote :

 * Did you perform an exploratory manual test run of the code change and any related functionality?

compiled it, but relied on CI to actually run all the tests.

 * Did CI run pass? If not, please explain why.

yip yip

 * Did you make sure that the branch does not contain spurious tags?

yes

review: Approve
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2202
http://jenkins.qa.ubuntu.com/job/unity8-ci/7337/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/6530
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/752/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/2042
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/745
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1937
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1937
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/744
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/743
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4985
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6541
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/6541/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27703
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/393/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/750
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/750/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/27702

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/7337/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/mocks/Unity/Application/MirSurface.cpp'
2--- tests/mocks/Unity/Application/MirSurface.cpp 2015-11-30 18:25:47 +0000
3+++ tests/mocks/Unity/Application/MirSurface.cpp 2016-02-17 12:51:06 +0000
4@@ -17,6 +17,7 @@
5 #include "MirSurface.h"
6
7 #include <QDebug>
8+#include <QQmlEngine>
9
10 MirSurface::MirSurface(const QString& name,
11 Mir::Type type,
12@@ -38,6 +39,8 @@
13 , m_slowToResize(false)
14 {
15 // qDebug() << "MirSurface::MirSurface() " << name;
16+ QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
17+
18 m_delayedResizeTimer.setInterval(600);
19 m_delayedResizeTimer.setSingleShot(true);
20 connect(&m_delayedResizeTimer, &QTimer::timeout, this, &MirSurface::applyDelayedResize);

Subscribers

People subscribed via source and target branches