Merge lp:~vanvugt/mir/rename-TimeSource-to-Clock into lp:mir
- rename-TimeSource-to-Clock
- Merge into development-branch
Status: | Merged |
---|---|
Approved by: | Daniel van Vugt |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1313 |
Proposed branch: | lp:~vanvugt/mir/rename-TimeSource-to-Clock |
Merge into: | lp:mir |
Prerequisite: | lp:~vanvugt/mir/compositor-report |
Diff against target: |
345 lines (+39/-39) 11 files modified
include/server/mir/default_server_configuration.h (+3/-3) include/server/mir/logging/message_processor_report.h (+3/-3) include/server/mir/time/clock.h (+6/-6) include/server/mir/time/high_resolution_clock.h (+2/-2) src/server/default_server_configuration.cpp (+3/-3) src/server/logging/compositor_report.cpp (+1/-1) src/server/logging/compositor_report.h (+3/-3) src/server/logging/default_configuration.cpp (+1/-1) src/server/logging/message_processor_report.cpp (+4/-4) tests/unit-tests/logging/message_processor_report.cpp (+12/-12) tests/unit-tests/logging/test_compositor_report.cpp (+1/-1) |
To merge this branch: | bzr merge lp:~vanvugt/mir/rename-TimeSource-to-Clock |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Kevin DuBois (community) | Abstain | ||
Robert Carr (community) | Abstain | ||
Review via email:
|
Commit message
Rename TimeSource to Clock
Description of the change
"Clock" is a more widely understood word for describing that thing from which you get the time...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Robert Carr (robertcarr) wrote : | # |
I would be mildly inclined to say a "Clock" is an implementation of a "TimeSource". I can't make a strong argument for any of the names here though.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Kevin DuBois (kdub) wrote : | # |
I don't see a strong reason to do this...
If we do though, lets update l27,208,236 to all be consistent
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
Better naming improves understanding and therefore maintainability. AFAIK all existing C and C++ interfaces for such functionality call it "clock".
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1312
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alan Griffiths (alan-griffiths) wrote : | # |
Maybe we should also rename namespace time to chrono too. ;)
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Daniel van Vugt (vanvugt) wrote : | # |
AFAICT "chrono" and "time" are synonyms. The former derived from Greek, the latter from Old English. But once again, choose the word more people will understand :)
Preview Diff
1 | === modified file 'include/server/mir/default_server_configuration.h' | |||
2 | --- include/server/mir/default_server_configuration.h 2013-12-20 08:04:42 +0000 | |||
3 | +++ include/server/mir/default_server_configuration.h 2014-01-06 02:59:24 +0000 | |||
4 | @@ -65,7 +65,7 @@ | |||
5 | 65 | } | 65 | } |
6 | 66 | namespace time | 66 | namespace time |
7 | 67 | { | 67 | { |
9 | 68 | class TimeSource; | 68 | class Clock; |
10 | 69 | } | 69 | } |
11 | 70 | namespace scene | 70 | namespace scene |
12 | 71 | { | 71 | { |
13 | @@ -230,7 +230,7 @@ | |||
14 | 230 | virtual std::shared_ptr<logging::Logger> the_logger(); | 230 | virtual std::shared_ptr<logging::Logger> the_logger(); |
15 | 231 | /** @} */ | 231 | /** @} */ |
16 | 232 | 232 | ||
18 | 233 | virtual std::shared_ptr<time::TimeSource> the_time_source(); | 233 | virtual std::shared_ptr<time::Clock> the_clock(); |
19 | 234 | 234 | ||
20 | 235 | protected: | 235 | protected: |
21 | 236 | using DefaultConfigurationOptions::the_options; | 236 | using DefaultConfigurationOptions::the_options; |
22 | @@ -283,7 +283,7 @@ | |||
23 | 283 | CachedPtr<compositor::CompositorReport> compositor_report; | 283 | CachedPtr<compositor::CompositorReport> compositor_report; |
24 | 284 | CachedPtr<logging::Logger> logger; | 284 | CachedPtr<logging::Logger> logger; |
25 | 285 | CachedPtr<graphics::DisplayReport> display_report; | 285 | CachedPtr<graphics::DisplayReport> display_report; |
27 | 286 | CachedPtr<time::TimeSource> time_source; | 286 | CachedPtr<time::Clock> clock; |
28 | 287 | CachedPtr<MainLoop> main_loop; | 287 | CachedPtr<MainLoop> main_loop; |
29 | 288 | CachedPtr<ServerStatusListener> server_status_listener; | 288 | CachedPtr<ServerStatusListener> server_status_listener; |
30 | 289 | CachedPtr<graphics::DisplayConfigurationPolicy> display_configuration_policy; | 289 | CachedPtr<graphics::DisplayConfigurationPolicy> display_configuration_policy; |
31 | 290 | 290 | ||
32 | === modified file 'include/server/mir/logging/message_processor_report.h' | |||
33 | --- include/server/mir/logging/message_processor_report.h 2013-08-28 03:41:48 +0000 | |||
34 | +++ include/server/mir/logging/message_processor_report.h 2014-01-06 02:59:24 +0000 | |||
35 | @@ -20,7 +20,7 @@ | |||
36 | 20 | #define MIR_LOGGING_MESSAGE_PROCESSOR_REPORT_H_ | 20 | #define MIR_LOGGING_MESSAGE_PROCESSOR_REPORT_H_ |
37 | 21 | 21 | ||
38 | 22 | #include "mir/frontend/message_processor_report.h" | 22 | #include "mir/frontend/message_processor_report.h" |
40 | 23 | #include "mir/time/time_source.h" | 23 | #include "mir/time/clock.h" |
41 | 24 | 24 | ||
42 | 25 | #include <memory> | 25 | #include <memory> |
43 | 26 | #include <mutex> | 26 | #include <mutex> |
44 | @@ -56,7 +56,7 @@ | |||
45 | 56 | public: | 56 | public: |
46 | 57 | MessageProcessorReport( | 57 | MessageProcessorReport( |
47 | 58 | std::shared_ptr<Logger> const& log, | 58 | std::shared_ptr<Logger> const& log, |
49 | 59 | std::shared_ptr<time::TimeSource> const& time_source); | 59 | std::shared_ptr<time::Clock> const& clock); |
50 | 60 | 60 | ||
51 | 61 | void received_invocation(void const* mediator, int id, std::string const& method); | 61 | void received_invocation(void const* mediator, int id, std::string const& method); |
52 | 62 | 62 | ||
53 | @@ -74,7 +74,7 @@ | |||
54 | 74 | 74 | ||
55 | 75 | private: | 75 | private: |
56 | 76 | std::shared_ptr<Logger> const log; | 76 | std::shared_ptr<Logger> const log; |
58 | 77 | std::shared_ptr<time::TimeSource> const time_source; | 77 | std::shared_ptr<time::Clock> const clock; |
59 | 78 | std::mutex mutex; | 78 | std::mutex mutex; |
60 | 79 | detail::Mediators mediators; | 79 | detail::Mediators mediators; |
61 | 80 | }; | 80 | }; |
62 | 81 | 81 | ||
63 | === renamed file 'include/server/mir/time/time_source.h' => 'include/server/mir/time/clock.h' | |||
64 | --- include/server/mir/time/time_source.h 2013-04-24 05:22:20 +0000 | |||
65 | +++ include/server/mir/time/clock.h 2014-01-06 02:59:24 +0000 | |||
66 | @@ -16,8 +16,8 @@ | |||
67 | 16 | * Authored by: Thomas Voss <thomas.voss@canonical.com> | 16 | * Authored by: Thomas Voss <thomas.voss@canonical.com> |
68 | 17 | */ | 17 | */ |
69 | 18 | 18 | ||
72 | 19 | #ifndef MIR_TIME_TIME_SOURCE_H_ | 19 | #ifndef MIR_TIME_CLOCK_H_ |
73 | 20 | #define MIR_TIME_TIME_SOURCE_H_ | 20 | #define MIR_TIME_CLOCK_H_ |
74 | 21 | 21 | ||
75 | 22 | #include <chrono> | 22 | #include <chrono> |
76 | 23 | 23 | ||
77 | @@ -28,17 +28,17 @@ | |||
78 | 28 | 28 | ||
79 | 29 | typedef std::chrono::high_resolution_clock::time_point Timestamp; | 29 | typedef std::chrono::high_resolution_clock::time_point Timestamp; |
80 | 30 | 30 | ||
82 | 31 | class TimeSource | 31 | class Clock |
83 | 32 | { | 32 | { |
84 | 33 | public: | 33 | public: |
86 | 34 | virtual ~TimeSource() = default; | 34 | virtual ~Clock() = default; |
87 | 35 | 35 | ||
88 | 36 | virtual Timestamp sample() const = 0; | 36 | virtual Timestamp sample() const = 0; |
89 | 37 | 37 | ||
90 | 38 | protected: | 38 | protected: |
92 | 39 | TimeSource() = default; | 39 | Clock() = default; |
93 | 40 | }; | 40 | }; |
94 | 41 | } | 41 | } |
95 | 42 | } | 42 | } |
96 | 43 | 43 | ||
98 | 44 | #endif // MIR_TIME_TIME_SOURCE_H_ | 44 | #endif // MIR_TIME_CLOCK_H_ |
99 | 45 | 45 | ||
100 | === modified file 'include/server/mir/time/high_resolution_clock.h' | |||
101 | --- include/server/mir/time/high_resolution_clock.h 2013-04-24 05:22:20 +0000 | |||
102 | +++ include/server/mir/time/high_resolution_clock.h 2014-01-06 02:59:24 +0000 | |||
103 | @@ -19,14 +19,14 @@ | |||
104 | 19 | #ifndef MIR_TIME_HIGH_RESOLUTION_CLOCK_H_ | 19 | #ifndef MIR_TIME_HIGH_RESOLUTION_CLOCK_H_ |
105 | 20 | #define MIR_TIME_HIGH_RESOLUTION_CLOCK_H_ | 20 | #define MIR_TIME_HIGH_RESOLUTION_CLOCK_H_ |
106 | 21 | 21 | ||
108 | 22 | #include "mir/time/time_source.h" | 22 | #include "mir/time/clock.h" |
109 | 23 | 23 | ||
110 | 24 | namespace mir | 24 | namespace mir |
111 | 25 | { | 25 | { |
112 | 26 | namespace time | 26 | namespace time |
113 | 27 | { | 27 | { |
114 | 28 | 28 | ||
116 | 29 | class HighResolutionClock : public TimeSource | 29 | class HighResolutionClock : public Clock |
117 | 30 | { | 30 | { |
118 | 31 | public: | 31 | public: |
119 | 32 | virtual Timestamp sample() const override; | 32 | virtual Timestamp sample() const override; |
120 | 33 | 33 | ||
121 | === modified file 'src/server/default_server_configuration.cpp' | |||
122 | --- src/server/default_server_configuration.cpp 2013-12-18 02:19:19 +0000 | |||
123 | +++ src/server/default_server_configuration.cpp 2014-01-06 02:59:24 +0000 | |||
124 | @@ -183,7 +183,7 @@ | |||
125 | 183 | auto mp_report = the_options()->get(msg_processor_report_opt, off_opt_value); | 183 | auto mp_report = the_options()->get(msg_processor_report_opt, off_opt_value); |
126 | 184 | if (mp_report == log_opt_value) | 184 | if (mp_report == log_opt_value) |
127 | 185 | { | 185 | { |
129 | 186 | return std::make_shared<ml::MessageProcessorReport>(the_logger(), the_time_source()); | 186 | return std::make_shared<ml::MessageProcessorReport>(the_logger(), the_clock()); |
130 | 187 | } | 187 | } |
131 | 188 | else if (mp_report == lttng_opt_value) | 188 | else if (mp_report == lttng_opt_value) |
132 | 189 | { | 189 | { |
133 | @@ -222,9 +222,9 @@ | |||
134 | 222 | return the_input_manager(); | 222 | return the_input_manager(); |
135 | 223 | } | 223 | } |
136 | 224 | 224 | ||
138 | 225 | std::shared_ptr<mir::time::TimeSource> mir::DefaultServerConfiguration::the_time_source() | 225 | std::shared_ptr<mir::time::Clock> mir::DefaultServerConfiguration::the_clock() |
139 | 226 | { | 226 | { |
141 | 227 | return time_source( | 227 | return clock( |
142 | 228 | []() | 228 | []() |
143 | 229 | { | 229 | { |
144 | 230 | return std::make_shared<mir::time::HighResolutionClock>(); | 230 | return std::make_shared<mir::time::HighResolutionClock>(); |
145 | 231 | 231 | ||
146 | === modified file 'src/server/logging/compositor_report.cpp' | |||
147 | --- src/server/logging/compositor_report.cpp 2014-01-02 09:10:38 +0000 | |||
148 | +++ src/server/logging/compositor_report.cpp 2014-01-06 02:59:24 +0000 | |||
149 | @@ -31,7 +31,7 @@ | |||
150 | 31 | 31 | ||
151 | 32 | logging::CompositorReport::CompositorReport( | 32 | logging::CompositorReport::CompositorReport( |
152 | 33 | std::shared_ptr<Logger> const& logger, | 33 | std::shared_ptr<Logger> const& logger, |
154 | 34 | std::shared_ptr<TimeSource> const& clock) | 34 | std::shared_ptr<Clock> const& clock) |
155 | 35 | : logger(logger), | 35 | : logger(logger), |
156 | 36 | clock(clock), | 36 | clock(clock), |
157 | 37 | last_report(now()) | 37 | last_report(now()) |
158 | 38 | 38 | ||
159 | === modified file 'src/server/logging/compositor_report.h' | |||
160 | --- src/server/logging/compositor_report.h 2014-01-02 09:10:38 +0000 | |||
161 | +++ src/server/logging/compositor_report.h 2014-01-06 02:59:24 +0000 | |||
162 | @@ -20,7 +20,7 @@ | |||
163 | 20 | #define MIR_LOGGING_COMPOSITOR_REPORT_H_ | 20 | #define MIR_LOGGING_COMPOSITOR_REPORT_H_ |
164 | 21 | 21 | ||
165 | 22 | #include "mir/compositor/compositor_report.h" | 22 | #include "mir/compositor/compositor_report.h" |
167 | 23 | #include "mir/time/time_source.h" | 23 | #include "mir/time/clock.h" |
168 | 24 | #include <memory> | 24 | #include <memory> |
169 | 25 | #include <mutex> | 25 | #include <mutex> |
170 | 26 | #include <unordered_map> | 26 | #include <unordered_map> |
171 | @@ -37,7 +37,7 @@ | |||
172 | 37 | { | 37 | { |
173 | 38 | public: | 38 | public: |
174 | 39 | CompositorReport(std::shared_ptr<Logger> const& logger, | 39 | CompositorReport(std::shared_ptr<Logger> const& logger, |
176 | 40 | std::shared_ptr<time::TimeSource> const& clock); | 40 | std::shared_ptr<time::Clock> const& clock); |
177 | 41 | void added_display(int width, int height, int x, int y, SubCompositorId id); | 41 | void added_display(int width, int height, int x, int y, SubCompositorId id); |
178 | 42 | void began_frame(SubCompositorId id); | 42 | void began_frame(SubCompositorId id); |
179 | 43 | void finished_frame(SubCompositorId id); | 43 | void finished_frame(SubCompositorId id); |
180 | @@ -47,7 +47,7 @@ | |||
181 | 47 | 47 | ||
182 | 48 | private: | 48 | private: |
183 | 49 | std::shared_ptr<Logger> const logger; | 49 | std::shared_ptr<Logger> const logger; |
185 | 50 | std::shared_ptr<time::TimeSource> const clock; | 50 | std::shared_ptr<time::Clock> const clock; |
186 | 51 | 51 | ||
187 | 52 | typedef time::Timestamp TimePoint; | 52 | typedef time::Timestamp TimePoint; |
188 | 53 | TimePoint now() const; | 53 | TimePoint now() const; |
189 | 54 | 54 | ||
190 | === modified file 'src/server/logging/default_configuration.cpp' | |||
191 | --- src/server/logging/default_configuration.cpp 2013-12-24 06:16:59 +0000 | |||
192 | +++ src/server/logging/default_configuration.cpp 2014-01-06 02:59:24 +0000 | |||
193 | @@ -81,7 +81,7 @@ | |||
194 | 81 | if (the_options()->get(compositor_report_opt, off_opt_value) == log_opt_value) | 81 | if (the_options()->get(compositor_report_opt, off_opt_value) == log_opt_value) |
195 | 82 | { | 82 | { |
196 | 83 | return std::make_shared<ml::CompositorReport>( | 83 | return std::make_shared<ml::CompositorReport>( |
198 | 84 | the_logger(), the_time_source()); | 84 | the_logger(), the_clock()); |
199 | 85 | } | 85 | } |
200 | 86 | else | 86 | else |
201 | 87 | { | 87 | { |
202 | 88 | 88 | ||
203 | === modified file 'src/server/logging/message_processor_report.cpp' | |||
204 | --- src/server/logging/message_processor_report.cpp 2013-12-12 08:34:23 +0000 | |||
205 | +++ src/server/logging/message_processor_report.cpp 2014-01-06 02:59:24 +0000 | |||
206 | @@ -32,9 +32,9 @@ | |||
207 | 32 | 32 | ||
208 | 33 | ml::MessageProcessorReport::MessageProcessorReport( | 33 | ml::MessageProcessorReport::MessageProcessorReport( |
209 | 34 | std::shared_ptr<Logger> const& log, | 34 | std::shared_ptr<Logger> const& log, |
211 | 35 | std::shared_ptr<time::TimeSource> const& time_source) : | 35 | std::shared_ptr<time::Clock> const& clock) : |
212 | 36 | log(log), | 36 | log(log), |
214 | 37 | time_source(time_source) | 37 | clock(clock) |
215 | 38 | { | 38 | { |
216 | 39 | } | 39 | } |
217 | 40 | 40 | ||
218 | @@ -79,13 +79,13 @@ | |||
219 | 79 | auto& invocations = mediators[mediator].current_invocations; | 79 | auto& invocations = mediators[mediator].current_invocations; |
220 | 80 | auto& invocation = invocations[id]; | 80 | auto& invocation = invocations[id]; |
221 | 81 | 81 | ||
223 | 82 | invocation.start = time_source->sample(); | 82 | invocation.start = clock->sample(); |
224 | 83 | invocation.method = method; | 83 | invocation.method = method; |
225 | 84 | } | 84 | } |
226 | 85 | 85 | ||
227 | 86 | void ml::MessageProcessorReport::completed_invocation(void const* mediator, int id, bool result) | 86 | void ml::MessageProcessorReport::completed_invocation(void const* mediator, int id, bool result) |
228 | 87 | { | 87 | { |
230 | 88 | auto const end = time_source->sample(); | 88 | auto const end = clock->sample(); |
231 | 89 | std::ostringstream out; | 89 | std::ostringstream out; |
232 | 90 | 90 | ||
233 | 91 | { | 91 | { |
234 | 92 | 92 | ||
235 | === modified file 'tests/unit-tests/logging/message_processor_report.cpp' | |||
236 | --- tests/unit-tests/logging/message_processor_report.cpp 2013-03-28 14:20:06 +0000 | |||
237 | +++ tests/unit-tests/logging/message_processor_report.cpp 2014-01-06 02:59:24 +0000 | |||
238 | @@ -28,12 +28,12 @@ | |||
239 | 28 | 28 | ||
240 | 29 | namespace | 29 | namespace |
241 | 30 | { | 30 | { |
243 | 31 | class MockTimeSource : public mir::time::TimeSource | 31 | class MockClock : public mir::time::Clock |
244 | 32 | { | 32 | { |
245 | 33 | public: | 33 | public: |
246 | 34 | MOCK_CONST_METHOD0(sample, mir::time::Timestamp()); | 34 | MOCK_CONST_METHOD0(sample, mir::time::Timestamp()); |
247 | 35 | 35 | ||
249 | 36 | ~MockTimeSource() noexcept(true) {} | 36 | ~MockClock() noexcept(true) {} |
250 | 37 | }; | 37 | }; |
251 | 38 | 38 | ||
252 | 39 | class MockLogger : public mir::logging::Logger | 39 | class MockLogger : public mir::logging::Logger |
253 | @@ -45,13 +45,13 @@ | |||
254 | 45 | 45 | ||
255 | 46 | struct MessageProcessorReport : public Test | 46 | struct MessageProcessorReport : public Test |
256 | 47 | { | 47 | { |
259 | 48 | MockLogger logger; | 48 | MockLogger logger; |
260 | 49 | MockTimeSource time_source; | 49 | MockClock clock; |
261 | 50 | 50 | ||
262 | 51 | mir::logging::MessageProcessorReport report; | 51 | mir::logging::MessageProcessorReport report; |
263 | 52 | 52 | ||
264 | 53 | MessageProcessorReport() : | 53 | MessageProcessorReport() : |
266 | 54 | report(mir::test::fake_shared(logger), mir::test::fake_shared(time_source)) | 54 | report(mir::test::fake_shared(logger), mir::test::fake_shared(clock)) |
267 | 55 | { | 55 | { |
268 | 56 | EXPECT_CALL(logger, log( | 56 | EXPECT_CALL(logger, log( |
269 | 57 | mir::logging::Logger::debug, | 57 | mir::logging::Logger::debug, |
270 | @@ -64,7 +64,7 @@ | |||
271 | 64 | TEST_F(MessageProcessorReport, everything_fine) | 64 | TEST_F(MessageProcessorReport, everything_fine) |
272 | 65 | { | 65 | { |
273 | 66 | mir::time::Timestamp a_time; | 66 | mir::time::Timestamp a_time; |
275 | 67 | EXPECT_CALL(time_source, sample()).Times(2).WillRepeatedly(Return(a_time)); | 67 | EXPECT_CALL(clock, sample()).Times(2).WillRepeatedly(Return(a_time)); |
276 | 68 | EXPECT_CALL(logger, log( | 68 | EXPECT_CALL(logger, log( |
277 | 69 | mir::logging::Logger::informational, | 69 | mir::logging::Logger::informational, |
278 | 70 | EndsWith(": a_function(), elapsed=0µs"), | 70 | EndsWith(": a_function(), elapsed=0µs"), |
279 | @@ -79,7 +79,7 @@ | |||
280 | 79 | mir::time::Timestamp a_time; | 79 | mir::time::Timestamp a_time; |
281 | 80 | mir::time::Timestamp another_time = a_time + std::chrono::microseconds(1234); | 80 | mir::time::Timestamp another_time = a_time + std::chrono::microseconds(1234); |
282 | 81 | 81 | ||
284 | 82 | EXPECT_CALL(time_source, sample()).Times(2) | 82 | EXPECT_CALL(clock, sample()).Times(2) |
285 | 83 | .WillOnce(Return(a_time)).WillOnce(Return(another_time)); | 83 | .WillOnce(Return(a_time)).WillOnce(Return(another_time)); |
286 | 84 | 84 | ||
287 | 85 | EXPECT_CALL(logger, log( | 85 | EXPECT_CALL(logger, log( |
288 | @@ -94,7 +94,7 @@ | |||
289 | 94 | TEST_F(MessageProcessorReport, reports_disconnect) | 94 | TEST_F(MessageProcessorReport, reports_disconnect) |
290 | 95 | { | 95 | { |
291 | 96 | mir::time::Timestamp a_time; | 96 | mir::time::Timestamp a_time; |
293 | 97 | EXPECT_CALL(time_source, sample()).Times(2).WillRepeatedly(Return(a_time)); | 97 | EXPECT_CALL(clock, sample()).Times(2).WillRepeatedly(Return(a_time)); |
294 | 98 | EXPECT_CALL(logger, log( | 98 | EXPECT_CALL(logger, log( |
295 | 99 | mir::logging::Logger::informational, | 99 | mir::logging::Logger::informational, |
296 | 100 | HasSubstr("(disconnecting)"), | 100 | HasSubstr("(disconnecting)"), |
297 | @@ -109,7 +109,7 @@ | |||
298 | 109 | const char* testError = "***Test error***"; | 109 | const char* testError = "***Test error***"; |
299 | 110 | 110 | ||
300 | 111 | mir::time::Timestamp a_time; | 111 | mir::time::Timestamp a_time; |
302 | 112 | EXPECT_CALL(time_source, sample()).Times(2).WillRepeatedly(Return(a_time)); | 112 | EXPECT_CALL(clock, sample()).Times(2).WillRepeatedly(Return(a_time)); |
303 | 113 | EXPECT_CALL(logger, log( | 113 | EXPECT_CALL(logger, log( |
304 | 114 | mir::logging::Logger::informational, | 114 | mir::logging::Logger::informational, |
305 | 115 | HasSubstr(testError), | 115 | HasSubstr(testError), |
306 | @@ -122,7 +122,7 @@ | |||
307 | 122 | 122 | ||
308 | 123 | TEST_F(MessageProcessorReport, reports_unknown_method) | 123 | TEST_F(MessageProcessorReport, reports_unknown_method) |
309 | 124 | { | 124 | { |
311 | 125 | EXPECT_CALL(time_source, sample()).Times(0); | 125 | EXPECT_CALL(clock, sample()).Times(0); |
312 | 126 | EXPECT_CALL(logger, log( | 126 | EXPECT_CALL(logger, log( |
313 | 127 | mir::logging::Logger::warning, | 127 | mir::logging::Logger::warning, |
314 | 128 | HasSubstr("UNKNOWN method=\"unknown_function_name\""), | 128 | HasSubstr("UNKNOWN method=\"unknown_function_name\""), |
315 | @@ -146,7 +146,7 @@ | |||
316 | 146 | TEST_F(MessageProcessorReport, logs_a_debug_message_when_invocation_starts) | 146 | TEST_F(MessageProcessorReport, logs_a_debug_message_when_invocation_starts) |
317 | 147 | { | 147 | { |
318 | 148 | mir::time::Timestamp a_time; | 148 | mir::time::Timestamp a_time; |
320 | 149 | EXPECT_CALL(time_source, sample()).Times(AnyNumber()).WillRepeatedly(Return(a_time)); | 149 | EXPECT_CALL(clock, sample()).Times(AnyNumber()).WillRepeatedly(Return(a_time)); |
321 | 150 | EXPECT_CALL(logger, log( | 150 | EXPECT_CALL(logger, log( |
322 | 151 | mir::logging::Logger::informational, | 151 | mir::logging::Logger::informational, |
323 | 152 | HasSubstr("Calls outstanding on exit:"), | 152 | HasSubstr("Calls outstanding on exit:"), |
324 | @@ -163,7 +163,7 @@ | |||
325 | 163 | TEST_F(MessageProcessorReport, logs_incomplete_calls_on_destruction) | 163 | TEST_F(MessageProcessorReport, logs_incomplete_calls_on_destruction) |
326 | 164 | { | 164 | { |
327 | 165 | mir::time::Timestamp a_time; | 165 | mir::time::Timestamp a_time; |
329 | 166 | EXPECT_CALL(time_source, sample()).Times(AnyNumber()).WillRepeatedly(Return(a_time)); | 166 | EXPECT_CALL(clock, sample()).Times(AnyNumber()).WillRepeatedly(Return(a_time)); |
330 | 167 | 167 | ||
331 | 168 | EXPECT_CALL(logger, log( | 168 | EXPECT_CALL(logger, log( |
332 | 169 | mir::logging::Logger::informational, | 169 | mir::logging::Logger::informational, |
333 | 170 | 170 | ||
334 | === modified file 'tests/unit-tests/logging/test_compositor_report.cpp' | |||
335 | --- tests/unit-tests/logging/test_compositor_report.cpp 2013-12-24 08:07:27 +0000 | |||
336 | +++ tests/unit-tests/logging/test_compositor_report.cpp 2014-01-06 02:59:24 +0000 | |||
337 | @@ -28,7 +28,7 @@ | |||
338 | 28 | namespace | 28 | namespace |
339 | 29 | { | 29 | { |
340 | 30 | 30 | ||
342 | 31 | class FakeClock : public time::TimeSource | 31 | class FakeClock : public time::Clock |
343 | 32 | { | 32 | { |
344 | 33 | public: | 33 | public: |
345 | 34 | void elapse(chrono::microseconds delta) | 34 | void elapse(chrono::microseconds delta) |
PASSED: Continuous integration, rev:1310 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- ci/603/ jenkins. qa.ubuntu. com/job/ mir-android- trusty- i386-build/ 550 jenkins. qa.ubuntu. com/job/ mir-clang- trusty- amd64-build/ 546 jenkins. qa.ubuntu. com/job/ mir-mediumtests -trusty- touch/154 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 329 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 329/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 332 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 332/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- trusty- armhf/154 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- trusty- armhf/154/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/181 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 2680
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- team-mir- development- branch- ci/603/ rebuild
http://