Merge lp://staging/~ted/ubuntu-app-launch/jobs-tests into lp://staging/ubuntu-app-launch

Proposed by Ted Gould
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 286
Merged at revision: 279
Proposed branch: lp://staging/~ted/ubuntu-app-launch/jobs-tests
Merge into: lp://staging/ubuntu-app-launch
Prerequisite: lp://staging/~ted/ubuntu-app-launch/signal-instances
Diff against target: 2286 lines (+691/-339)
16 files modified
CMakeLists.txt (+22/-9)
debian/control (+1/-0)
libubuntu-app-launch/registry-impl.h (+1/-1)
tests/CMakeLists.txt (+23/-17)
tests/cgroup-reap-test.cc (+1/-1)
tests/eventually-fixture.h (+57/-0)
tests/exec-util-test.cc (+1/-1)
tests/helper-test.cc (+25/-25)
tests/jobs-base-test.cpp (+249/-0)
tests/libual-cpp-test.cc (+83/-199)
tests/libual-test.cc (+53/-47)
tests/list-apps.cpp (+6/-6)
tests/snapd-info-test.cpp (+10/-8)
tests/snapd-mock.h (+1/-1)
tests/spew-master.h (+142/-0)
tests/zg-test.cc (+16/-24)
To merge this branch: bzr merge lp://staging/~ted/ubuntu-app-launch/jobs-tests
Reviewer Review Type Date Requested Status
Marcus Tomlinson (community) Approve
unity-api-1-bot continuous-integration Needs Fixing
dobey (community) Needs Fixing
Review via email: mp+310589@code.staging.launchpad.net

This proposal supersedes a proposal from 2016-10-26.

Commit message

Jobs interface specific tests

Description of the change

This adds some tests on the base instance object. I'd like this to expand to be on the manager object as well, but it looks like there is already coverage on them from the other tests. So going to avoid that in this branch as that'll be a larger refactor (started on it, but it is going to be a big branch, will put on its own MR)

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
dobey (dobey) :
review: Needs Fixing
Revision history for this message
Ted Gould (ted) wrote :

Merged the gmock-fixes branch into this one because basically everything was caused by this branch anyway. Will drop that one off the end of the silo. Fixes a bunch of comments.

274. By Ted Gould

Merge upstream changes

275. By Ted Gould

Backport the changes on the gmock-fix branch to here, where most of the problems were caused

276. By Ted Gould

Use a clearer definition of unsigned

277. By Ted Gould

Only or onto the transitional google-mock package

278. By Ted Gould

Alphabetize list

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
279. By Ted Gould

Make build on 32-bit architectures where gsize is a different size

280. By Ted Gould

Make it so that tests can run in parallel without running over each other

Revision history for this message
dobey (dobey) wrote :

Some more in-line. Also, after removing launcher-static from coverage targets, I am getting the following error consistently from the failure-tests locally:

** (process:22885): CRITICAL **: Error parsing manifest for package 'com.test.good': com.test.good does not exist in any database for user test-user
terminate called after throwing an instance of 'std::runtime_error'
  what(): Unable to get Click manifest for package: com.test.good
zsh: abort (core dumped) ./build/tests/failure-test

review: Needs Fixing
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:280
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/165/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1357/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1364
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1142
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1142/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1142
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1142/artifact/output/*zip*/output.zip
    ABORTED: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1142/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1142/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1142
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1142/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1142
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1142/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/165/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

On Thu, 2017-01-12 at 23:07 +0000, Rodney Dawes wrote:
> > +STRING(TOLOWER "${CMAKE_BUILD_TYPE}" LOWER_CMAKE_BUILD_TYPE) +if
> > ("${LOWER_CMAKE_BUILD_TYPE}" STREQUAL "coverage") + set(CMAK
> > E_LINK_FLAGS "${CMAKE_LINK_FLAGS} -lgcov")
>  Please replace tabs here with spaces, to be consistent with the rest
> of the file, and because this is not a Makefile. Also, can you
> elaborate on what exactly breaks with this block removed?
It was the snapd-info-test, but as per bellow, find changing that.

> > +endif()
> > +
> > enable_testing()
> >
> > pkg_check_modules(GLIB2 REQUIRED glib-2.0)
> > @@ -237,7 +239,22 @@
> > list(APPEND filter-list "${CMAKE_BINARY_DIR}/*")
> > endif()
> > ENABLE_COVERAGE_REPORT(
> > - TARGETS ubuntu-launcher
> > - TESTS application-icon-finder-test application-info-desktop-test
> > cgroup-reap-test exec-util-test failure-test helper-test helper-
> > handshake-test libual-test libual-cpp-test zg-test
> > - FILTER ${filter-list}
> > + TARGETS
> > + ubuntu-launcher
> > + launcher-static> >

> Having launcher-static here results in linker failures when I try to
> build this branch or any that depend on it, locally. Please remove
> launcher-static here, as it's not necessary.>

It is needed for several of the tests. It builds for me and in
Launchpad, so I don't think there's a build error caused by it.

> > + TESTS
> > + application-icon-finder-test
> > + application-info-desktop-test
> > + cgroup-reap-test exec-util-test
> > + failure-test
> > + helper-test
> > + helper-handshake-test
> > + jobs-base-test
> > + libual-test
> > + libual-cpp-test
> > + list-apps
> > +# snap-info-test> >

> Please uncomment this, as I don't think there's any reason this would
> be not built on the platforms we're landing this on. We don't need to
> support vivid in trunk any more, so no need to be overly cautious
> about avoiding snap support (need to get rid of all the ifdefs later,
> but doesn't need to be in this branch, or series of).>

Eh, WFM. r281
>

> Why do you have both gtest_main and ${GTEST_MAIN_LIBRARIES} all over
> the place here? Please just use ${GMOCK_LIBRARIES} in place of both,
> here and everywhere else you do this.>

Some of the tests use GMOCK and some don't. It seems like that's the
difference between the two variables, no?
>
>

281. By Ted Gould

Remove -lgcov hack and add snapd-info-test to the list of tests

282. By Ted Gould

Uhg, wanted to delete not just comment out

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:282
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/167/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1367/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1374
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1152
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1152/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1152
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1152/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1152/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1152/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1152
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1152/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1152
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1152/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/167/rebuild

review: Needs Fixing (continuous-integration)
283. By Ted Gould

Update to trunk

284. By Ted Gould

Switch to the local socket to avoid conflicts

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:284
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/173/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1455/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1462
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1240/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1240
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1240/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1240
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1240/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1240/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1240/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1240
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1240/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/173/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

When trying to build this MP stack I got build errors about missing headers for libwhoopsie-dev and liblibertine-dev, though CMake didn't complain about them being missing from my system. Could you add find_package(x REQUIRED) lines for these.

Otherwise, again, very impressed by the test coverage you're maintaining in this project Ted. Outstanding.

review: Needs Fixing
Revision history for this message
Ted Gould (ted) wrote :

On Fri, 2017-01-20 at 09:20 +0000, Marcus Tomlinson wrote:
> When trying to build this MP stack I got build errors about missing
> headers for libwhoopsie-dev and liblibertine-dev, though CMake didn't
> complain about them being missing from my system. Could you add
> find_package(x REQUIRED) lines for these.
Fixed r285
> > + cgroup-reap-test exec-util-test
> >

>
> Small miss: exec-util-test should be on a new line
>

Fixed r286

285. By Ted Gould

Make required libraries required

286. By Ted Gould

Fix listing of targets

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

FAILED: Continuous integration, rev:286
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/175/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build/1502/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1509
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1287/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1287
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1287/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1287
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1287/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1287/console
    FAILURE: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1287/console
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1287
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1287/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/175/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches