Merge lp:~brandontschaefer/mir/static-test-fix into lp:mir
- static-test-fix
- Merge into development-branch
Status: | Merged |
---|---|
Merged at revision: | 3671 |
Proposed branch: | lp:~brandontschaefer/mir/static-test-fix |
Merge into: | lp:mir |
Diff against target: |
98 lines (+11/-18) 3 files modified
tests/acceptance-tests/test_new_display_configuration.cpp (+4/-10) tests/unit-tests/dispatch/test_multiplexing_dispatchable.cpp (+3/-3) tests/unit-tests/dispatch/test_threaded_dispatcher.cpp (+4/-5) |
To merge this branch: | bzr merge lp:~brandontschaefer/mir/static-test-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Kevin DuBois (community) | Approve | ||
Daniel van Vugt | Approve | ||
Chris Halse Rogers | Approve | ||
Review via email: mp+303901@code.launchpad.net |
This proposal supersedes a proposal from 2016-08-25.
Commit message
When doing --gtest_repeat=2 on a few tests they would fail due to a static variables.
Description of the change
When doing --gtest_repeat=2 on a few tests they would fail due to a static variables.
Chris Halse Rogers (raof) wrote : Posted in a previous version of this proposal | # |
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3657
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal | # |
^^^
vivid+overlay needs fixing to satisfy gcc-4.9. You can test that on desktop just by:
./cross-
The rest look like infrastructure failures.
Brandon Schaefer (brandontschaefer) wrote : Posted in a previous version of this proposal | # |
O it built the wrong branch (fixed since) Let me rebuild
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3657
https:/
Executed test runs:
Click here to trigger a rebuild:
https:/
Brandon Schaefer (brandontschaefer) wrote : Posted in a previous version of this proposal | # |
/me resubmits to fix an --overwrite
Chris Halse Rogers (raof) wrote : | # |
Continues to look good to me, assuming gcc-4.9's C++14 support is sufficiently robust to build it :)
Daniel van Vugt (vanvugt) wrote : | # |
Sure, if Jenkins is happy.
Daniel van Vugt (vanvugt) wrote : | # |
Jenkins will reject this due to bug 1586382 though. That should get resolved momentarily.
Mir CI Bot (mir-ci-bot) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3653
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Continuous integration, rev:3653
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Daniel van Vugt (vanvugt) wrote : | # |
^^^
Bug 1586382 (which is no longer a blocking issue). Update the branch and try again.
Kevin DuBois (kdub) : | # |
Mir CI Bot (mir-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:3653
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Mir CI Bot (mir-ci-bot) wrote : | # |
FAILED: Autolanding.
More details in the following jenkins job:
https:/
Executed test runs:
FAILURE: https:/
None: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Brandon Schaefer (brandontschaefer) wrote : | # |
20:07:06 [ 64%] Built target mir_privileged_
20:07:55 /usr/include/
20:07:55 /usr/include/
20:07:55 ../../.
20:07:55 /usr/include/
20:07:55 collect2: error: ld returned 1 exit status
:|
Daniel van Vugt (vanvugt) wrote : | # |
^^^
Bug 1616291
Preview Diff
1 | === modified file 'tests/acceptance-tests/test_new_display_configuration.cpp' | |||
2 | --- tests/acceptance-tests/test_new_display_configuration.cpp 2016-08-19 04:16:47 +0000 | |||
3 | +++ tests/acceptance-tests/test_new_display_configuration.cpp 2016-08-25 06:05:16 +0000 | |||
4 | @@ -731,10 +731,8 @@ | |||
5 | 731 | { | 731 | { |
6 | 732 | std::shared_ptr<mg::DisplayConfiguration> current_config = server.the_display()->configuration(); | 732 | std::shared_ptr<mg::DisplayConfiguration> current_config = server.the_display()->configuration(); |
7 | 733 | current_config->for_each_output( | 733 | current_config->for_each_output( |
9 | 734 | [](mg::UserDisplayConfigurationOutput& output) | 734 | [output_num = 0](mg::UserDisplayConfigurationOutput& output) mutable |
10 | 735 | { | 735 | { |
11 | 736 | static int output_num{0}; | ||
12 | 737 | |||
13 | 738 | output.scale = 1 + 0.25f * output_num; | 736 | output.scale = 1 + 0.25f * output_num; |
14 | 739 | ++output_num; | 737 | ++output_num; |
15 | 740 | }); | 738 | }); |
16 | @@ -775,10 +773,8 @@ | |||
17 | 775 | 773 | ||
18 | 776 | std::shared_ptr<mg::DisplayConfiguration> current_config = server.the_display()->configuration(); | 774 | std::shared_ptr<mg::DisplayConfiguration> current_config = server.the_display()->configuration(); |
19 | 777 | current_config->for_each_output( | 775 | current_config->for_each_output( |
21 | 778 | [&form_factors](mg::UserDisplayConfigurationOutput& output) | 776 | [&form_factors, output_num = 0](mg::UserDisplayConfigurationOutput& output) mutable |
22 | 779 | { | 777 | { |
23 | 780 | static int output_num{0}; | ||
24 | 781 | |||
25 | 782 | output.form_factor = form_factors[output_num]; | 778 | output.form_factor = form_factors[output_num]; |
26 | 783 | ++output_num; | 779 | ++output_num; |
27 | 784 | }); | 780 | }); |
28 | @@ -944,9 +940,8 @@ | |||
29 | 944 | 940 | ||
30 | 945 | DisplayConfigMatchingContext context; | 941 | DisplayConfigMatchingContext context; |
31 | 946 | auto reverted = std::make_shared<mt::Signal>(); | 942 | auto reverted = std::make_shared<mt::Signal>(); |
33 | 947 | context.matcher = [old_config, new_config, reverted](MirDisplayConfig* conf) | 943 | context.matcher = [old_config, new_config, reverted, call_count = 0](MirDisplayConfig* conf) mutable |
34 | 948 | { | 944 | { |
35 | 949 | static int call_count{0}; | ||
36 | 950 | ++call_count; | 945 | ++call_count; |
37 | 951 | if (call_count == 1) | 946 | if (call_count == 1) |
38 | 952 | { | 947 | { |
39 | @@ -1009,9 +1004,8 @@ | |||
40 | 1009 | 1004 | ||
41 | 1010 | DisplayConfigMatchingContext context; | 1005 | DisplayConfigMatchingContext context; |
42 | 1011 | auto signalled_twice = std::make_shared<mt::Signal>(); | 1006 | auto signalled_twice = std::make_shared<mt::Signal>(); |
44 | 1012 | context.matcher = [new_config, signalled_twice](MirDisplayConfig* conf) | 1007 | context.matcher = [new_config, signalled_twice, call_count = 0](MirDisplayConfig* conf) mutable |
45 | 1013 | { | 1008 | { |
46 | 1014 | static int call_count{0}; | ||
47 | 1015 | ++call_count; | 1009 | ++call_count; |
48 | 1016 | EXPECT_THAT(conf, mt::DisplayConfigMatches(new_config.get())); | 1010 | EXPECT_THAT(conf, mt::DisplayConfigMatches(new_config.get())); |
49 | 1017 | if (call_count == 2) | 1011 | if (call_count == 2) |
50 | 1018 | 1012 | ||
51 | === modified file 'tests/unit-tests/dispatch/test_multiplexing_dispatchable.cpp' | |||
52 | --- tests/unit-tests/dispatch/test_multiplexing_dispatchable.cpp 2015-06-25 03:00:08 +0000 | |||
53 | +++ tests/unit-tests/dispatch/test_multiplexing_dispatchable.cpp 2016-08-25 06:05:16 +0000 | |||
54 | @@ -193,10 +193,10 @@ | |||
55 | 193 | using namespace testing; | 193 | using namespace testing; |
56 | 194 | 194 | ||
57 | 195 | auto second_dispatch = std::make_shared<mt::Signal>(); | 195 | auto second_dispatch = std::make_shared<mt::Signal>(); |
59 | 196 | auto dispatchee = std::make_shared<mt::TestDispatchable>([second_dispatch]() | 196 | std::atomic<int> canary{0}; |
60 | 197 | std::atomic<int> total_count{0}; | ||
61 | 198 | auto dispatchee = std::make_shared<mt::TestDispatchable>([second_dispatch, &canary, &total_count]() | ||
62 | 197 | { | 199 | { |
63 | 198 | static std::atomic<int> canary{0}; | ||
64 | 199 | static std::atomic<int> total_count{0}; | ||
65 | 200 | 200 | ||
66 | 201 | ++canary; | 201 | ++canary; |
67 | 202 | EXPECT_THAT(canary, Eq(1)); | 202 | EXPECT_THAT(canary, Eq(1)); |
68 | 203 | 203 | ||
69 | === modified file 'tests/unit-tests/dispatch/test_threaded_dispatcher.cpp' | |||
70 | --- tests/unit-tests/dispatch/test_threaded_dispatcher.cpp 2016-05-03 06:55:25 +0000 | |||
71 | +++ tests/unit-tests/dispatch/test_threaded_dispatcher.cpp 2016-08-25 06:05:16 +0000 | |||
72 | @@ -130,11 +130,10 @@ | |||
73 | 130 | 130 | ||
74 | 131 | int constexpr expected_count{10}; | 131 | int constexpr expected_count{10}; |
75 | 132 | auto dispatched_more_than_enough = std::make_shared<mt::Signal>(); | 132 | auto dispatched_more_than_enough = std::make_shared<mt::Signal>(); |
76 | 133 | std::atomic<int> dispatch_count{0}; | ||
77 | 133 | 134 | ||
79 | 134 | auto delegate = [dispatched_more_than_enough](md::FdEvents) | 135 | auto delegate = [dispatched_more_than_enough, &dispatch_count](md::FdEvents) |
80 | 135 | { | 136 | { |
81 | 136 | static std::atomic<int> dispatch_count{0}; | ||
82 | 137 | |||
83 | 138 | if (++dispatch_count == expected_count) | 137 | if (++dispatch_count == expected_count) |
84 | 139 | { | 138 | { |
85 | 140 | return false; | 139 | return false; |
86 | @@ -288,10 +287,10 @@ | |||
87 | 288 | auto dispatched = std::make_shared<mt::Signal>(); | 287 | auto dispatched = std::make_shared<mt::Signal>(); |
88 | 289 | constexpr int const threadcount{3}; | 288 | constexpr int const threadcount{3}; |
89 | 290 | constexpr char const* threadname_base{"Madness Thread"}; | 289 | constexpr char const* threadname_base{"Madness Thread"}; |
90 | 290 | std::atomic<int> dispatch_count{0}; | ||
91 | 291 | 291 | ||
93 | 292 | auto dispatchable = std::make_shared<mt::TestDispatchable>([dispatched]() | 292 | auto dispatchable = std::make_shared<mt::TestDispatchable>([dispatched, &dispatch_count]() |
94 | 293 | { | 293 | { |
95 | 294 | static std::atomic<int> dispatch_count{0}; | ||
96 | 295 | char buffer[80] = {0}; | 294 | char buffer[80] = {0}; |
97 | 296 | pthread_getname_np(pthread_self(), buffer, sizeof(buffer)); | 295 | pthread_getname_np(pthread_self(), buffer, sizeof(buffer)); |
98 | 297 | EXPECT_THAT(buffer, StartsWith(threadname_base)); | 296 | EXPECT_THAT(buffer, StartsWith(threadname_base)); |
Thanks for cleaning up my mess.