Mir

Merge lp:~vanvugt/mir/fix-1570698 into lp:mir

Proposed by Daniel van Vugt
Status: Merged
Merged at revision: 3463
Proposed branch: lp:~vanvugt/mir/fix-1570698
Merge into: lp:mir
Diff against target: 39 lines (+12/-3)
1 file modified
tests/acceptance-tests/test_client_input.cpp (+12/-3)
To merge this branch: bzr merge lp:~vanvugt/mir/fix-1570698
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Needs Fixing
Cemil Azizoglu (community) Approve
Alan Griffiths Approve
Review via email: mp+291979@code.launchpad.net

Commit message

Fix spurious test failure of
   TestClientInput.receives_one_touch_event_per_frame
on slow/loaded machines (LP: #1570698)

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3461
https://mir-jenkins.ubuntu.com/job/mir-ci/844/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/855
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/892
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/883
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/883
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/865
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/865/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/865
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/865/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/865
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/865/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/865
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/865/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/865
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/865/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/844/rebuild

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Eugh!

review: Approve
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Ok

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
https://mir-jenkins.ubuntu.com/job/mir-autolanding/207/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/865
    FAILURE: https://mir-jenkins.ubuntu.com/job/generic-land-mp/220/console
    None: https://mir-jenkins.ubuntu.com/job/generic-land-mp/221/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/902
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/893
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/893
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/875
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/875/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/875
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/875/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/875
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/875/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/875
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/875/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/875
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/875/artifact/output/*zip*/output.zip

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/acceptance-tests/test_client_input.cpp'
2--- tests/acceptance-tests/test_client_input.cpp 2016-04-13 07:00:14 +0000
3+++ tests/acceptance-tests/test_client_input.cpp 2016-04-15 08:02:51 +0000
4@@ -605,9 +605,11 @@
5 EXPECT_CALL(first_client, handle_input(_))
6 .Times(Between(nframes-nframes_error, nframes+nframes_error))
7 .WillRepeatedly(InvokeWithoutArgs(
8- [&received_input_events]()
9+ [&]()
10 {
11 ++received_input_events;
12+ if (received_input_events >= nframes-nframes_error)
13+ first_client.all_events_received.raise();
14 }));
15
16 fake_touch_screen->emit_event(mis::a_touch_event()
17@@ -630,13 +632,20 @@
18 std::this_thread::sleep_for(frame_time);
19 }
20
21- std::this_thread::sleep_for(2 * frame_time);
22+ // Wait for the expected minimum number of events (should be quick)
23+ ASSERT_TRUE(first_client.all_events_received.wait_for(20s));
24+
25+ // The main thing we're testing for is that too many events don't arrive
26+ // so we wait a little to check the cooked event stream has stopped:
27+ std::this_thread::sleep_for(100 * frame_time);
28+
29 // Remove reference to local received_input_events
30 Mock::VerifyAndClearExpectations(&first_client);
31
32 float const client_input_events_per_frame =
33 (float)received_input_events / nframes;
34- EXPECT_NEAR(1.0f, client_input_events_per_frame, 0.2f);
35+ EXPECT_THAT(client_input_events_per_frame, Gt(0.0f));
36+ EXPECT_THAT(client_input_events_per_frame, Lt(1.5f));
37 }
38
39 TEST_F(TestClientInput, send_mir_input_events_through_surface)

Subscribers

People subscribed via source and target branches