Mir

Merge lp:~robert-ancell/mir/vt-option into lp:~mir-team/mir/trunk

Proposed by Robert Ancell
Status: Merged
Approved by: Chris Halse Rogers
Approved revision: no longer in the source branch.
Merged at revision: 763
Proposed branch: lp:~robert-ancell/mir/vt-option
Merge into: lp:~mir-team/mir/trunk
Diff against target: 487 lines (+92/-28)
12 files modified
examples/render_to_fb.cpp (+4/-1)
include/server/mir/graphics/platform.h (+6/-1)
src/server/default_server_configuration.cpp (+4/-2)
src/server/graphics/android/android_platform.cpp (+3/-1)
src/server/graphics/gbm/gbm_platform.cpp (+4/-2)
src/server/graphics/gbm/linux_virtual_terminal.cpp (+22/-1)
src/server/graphics/gbm/linux_virtual_terminal.h (+1/-0)
tests/integration-tests/graphics/android/test_internal_client.cpp (+4/-1)
tests/integration-tests/graphics/gbm/test_buffer_integration.cpp (+1/-1)
tests/unit-tests/graphics/android/test_android_platform.cpp (+3/-1)
tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp (+37/-16)
tests/unit-tests/graphics/test_graphics_platform.cpp (+3/-1)
To merge this branch: bzr merge lp:~robert-ancell/mir/vt-option
Reviewer Review Type Date Requested Status
Chris Halse Rogers Approve
Daniel van Vugt Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+170476@code.launchpad.net

Commit message

Allow the VT to run on to be specified

Description of the change

Make it possible to choose the VT. This is required when running from LightDM as it needs to be put on the VT that Plymouth was using. Also if we want Mir to work without a system compositor we need to place each Mir server on a specified VT to be able to switch between them.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

1. Regression: Mouse pointer visible on all VTs (regression of bug 1176117).

2. Regression: X server dies when switching VTs (regression of bug ???).

3. Mir server is not always visible on the VT specified (the screen is not black.. ?).

4. Query: VT numbers seem to be:
  -1 -> current
  0 -> VT1
  1 -> VT2
  2 -> VT3
so why not use:
  0 -> current
  1 -> VT1
  2 -> VT2
  3 -> VT3
?

review: Needs Fixing
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

4. Umm, I mean you have:
  -1 -> current
  0 -> VT0 -> tty1 (Alt+F1)
  1 -> VT1 -> tty2 (Alt+F2)
but I think this would make more sense to people:
  0 --> current
  1 -> VT0 -> tty1 (Alt+F1)
  2 -> VT1 -> tty2 (Alt+F2)
  ...

Revision history for this message
Robert Ancell (robert-ancell) wrote :

VT numbers seem to start at 1, so changed to:
0 --> current
1 -> VT1 -> tty1 (Alt+F1)
2 -> VT1 -> tty2 (Alt+F2)

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Setting the selected VT to active seems to fix any odd issues I've seen and matches what other display servers do.

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Cool, works nicely now.

I noticed a little bug, but that's only a side-effect and not really part of this proposal. Running as non-root gives a slightly inaccurate error message now:

(run from tty3) mir_demo_server_shell --vt 6
ERROR: /home/dan/bzr/mir/tmp.vt/src/server/graphics/gbm/linux_virtual_terminal.cpp(197): Throw in function int mir::graphics::gbm::LinuxVirtualTerminal::open_vt(int)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::runtime_error> >
std::exception::what: Failed to open current VT <---- This is wrong. It's not trying to open the "current" one.
[boost::errinfo_errno_*] = 13, "Permission denied"
[boost::errinfo_file_name_*] = /dev/tty6

review: Approve
Revision history for this message
Chris Halse Rogers (raof) wrote :

Looks good to me, does what it says on the tin.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/render_to_fb.cpp'
2--- examples/render_to_fb.cpp 2013-05-21 15:11:41 +0000
3+++ examples/render_to_fb.cpp 2013-06-21 01:45:33 +0000
4@@ -23,12 +23,15 @@
5 #include "mir/logging/display_report.h"
6 #include "mir/logging/dumb_console_logger.h"
7
8+#include "mir/options/program_option.h"
9+
10 #include "graphics.h"
11
12 #include <csignal>
13
14 namespace mg=mir::graphics;
15 namespace ml=mir::logging;
16+namespace mo=mir::options;
17
18 namespace
19 {
20@@ -54,7 +57,7 @@
21 sigaction(SIGTERM, &sa, NULL);
22
23 auto logger = std::make_shared<ml::DumbConsoleLogger>();
24- auto platform = mg::create_platform(std::make_shared<ml::DisplayReport>(logger));
25+ auto platform = mg::create_platform(std::make_shared<mo::ProgramOption>(), std::make_shared<ml::DisplayReport>(logger));
26 auto display = platform->create_display();
27
28 mir::draw::glAnimationBasic gl_animation;
29
30=== modified file 'include/server/mir/graphics/platform.h'
31--- include/server/mir/graphics/platform.h 2013-06-19 09:57:32 +0000
32+++ include/server/mir/graphics/platform.h 2013-06-21 01:45:33 +0000
33@@ -34,6 +34,10 @@
34 class Buffer;
35 class BufferIPCPacker;
36 }
37+namespace options
38+{
39+class Option;
40+}
41
42 /// Graphics subsystem. Mediates interaction between core system and
43 /// the graphics environment.
44@@ -107,13 +111,14 @@
45 /**
46 * Creates and returns a new graphics platform.
47 *
48+ * \param [in] options options to use for this platform
49 * \param [in] report the object to use to report interesting events from the display subsystem
50 *
51 * This factory function needs to be implemented by each platform.
52 *
53 * \ingroup platform_enablement
54 */
55-std::shared_ptr<Platform> create_platform(std::shared_ptr<DisplayReport> const& report);
56+std::shared_ptr<Platform> create_platform(std::shared_ptr<options::Option> const& options, std::shared_ptr<DisplayReport> const& report);
57
58 }
59 }
60
61=== modified file 'src/server/default_server_configuration.cpp'
62--- src/server/default_server_configuration.cpp 2013-06-12 16:25:38 +0000
63+++ src/server/default_server_configuration.cpp 2013-06-21 01:45:33 +0000
64@@ -242,7 +242,9 @@
65 "directory instead of the default logging directory."
66 " [string:default=\"\"]")
67 ("ipc-thread-pool", po::value<int>(),
68- "threads in frontend thread pool. [int:default=10]");
69+ "threads in frontend thread pool. [int:default=10]")
70+ ("vt", po::value<int>(),
71+ "VT to run on or 0 to use current. [int:default=0]");
72 }
73
74 boost::program_options::options_description_easy_init mir::DefaultServerConfiguration::add_options()
75@@ -299,7 +301,7 @@
76 // graphics libraries.
77 // Alternatively, if we want to dynamically load the graphics library
78 // then this would be the place to do that.
79- return mg::create_platform(the_display_report());
80+ return mg::create_platform(the_options(), the_display_report());
81 });
82 }
83
84
85=== modified file 'src/server/graphics/android/android_platform.cpp'
86--- src/server/graphics/android/android_platform.cpp 2013-06-12 10:23:43 +0000
87+++ src/server/graphics/android/android_platform.cpp 2013-06-21 01:45:33 +0000
88@@ -28,11 +28,13 @@
89 #include "mir/graphics/buffer_initializer.h"
90 #include "mir/compositor/buffer_id.h"
91 #include "mir/compositor/buffer_ipc_packer.h"
92+#include "mir/options/option.h"
93
94 namespace mg=mir::graphics;
95 namespace mga=mir::graphics::android;
96 namespace mc=mir::compositor;
97 namespace mf=mir::frontend;
98+namespace mo = mir::options;
99
100 mga::AndroidPlatform::AndroidPlatform(std::shared_ptr<mg::DisplayReport> const& display_report)
101 : display_report(display_report)
102@@ -98,7 +100,7 @@
103 return std::make_shared<mga::InternalClient>();
104 }
105
106-std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<DisplayReport> const& display_report)
107+std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<mo::Option> const& /*options*/, std::shared_ptr<DisplayReport> const& display_report)
108 {
109 return std::make_shared<mga::AndroidPlatform>(display_report);
110 }
111
112=== modified file 'src/server/graphics/gbm/gbm_platform.cpp'
113--- src/server/graphics/gbm/gbm_platform.cpp 2013-06-12 10:23:43 +0000
114+++ src/server/graphics/gbm/gbm_platform.cpp 2013-06-21 01:45:33 +0000
115@@ -24,6 +24,7 @@
116 #include "linux_virtual_terminal.h"
117 #include "mir/graphics/platform_ipc_package.h"
118 #include "mir/compositor/buffer_ipc_packer.h"
119+#include "mir/options/option.h"
120
121 #include "drm_close_threadsafe.h"
122
123@@ -33,6 +34,7 @@
124 namespace mg = mir::graphics;
125 namespace mgg = mg::gbm;
126 namespace mc = mir::compositor;
127+namespace mo = mir::options;
128 namespace
129 {
130
131@@ -142,10 +144,10 @@
132 return std::make_shared<mgg::InternalClient>(internal_native_display);
133 }
134
135-std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<DisplayReport> const& report)
136+std::shared_ptr<mg::Platform> mg::create_platform(std::shared_ptr<mo::Option> const& options, std::shared_ptr<DisplayReport> const& report)
137 {
138 auto real_fops = std::make_shared<RealVTFileOperations>();
139- auto vt = std::make_shared<mgg::LinuxVirtualTerminal>(real_fops, report);
140+ auto vt = std::make_shared<mgg::LinuxVirtualTerminal>(real_fops, options->get("vt", 0), report);
141 return std::make_shared<mgg::GBMPlatform>(report, vt);
142 }
143
144
145=== modified file 'src/server/graphics/gbm/linux_virtual_terminal.cpp'
146--- src/server/graphics/gbm/linux_virtual_terminal.cpp 2013-04-25 09:48:54 +0000
147+++ src/server/graphics/gbm/linux_virtual_terminal.cpp 2013-06-21 01:45:33 +0000
148@@ -38,10 +38,11 @@
149
150 mgg::LinuxVirtualTerminal::LinuxVirtualTerminal(
151 std::shared_ptr<VTFileOperations> const& fops,
152+ int vt_number,
153 std::shared_ptr<DisplayReport> const& report)
154 : fops{fops},
155 report{report},
156- vt_fd{fops, open_vt(find_active_vt_number())},
157+ vt_fd{fops, open_vt(vt_number)},
158 prev_kd_mode{0},
159 prev_vt_mode(),
160 active{true}
161@@ -173,6 +174,13 @@
162
163 int mgg::LinuxVirtualTerminal::open_vt(int vt_number)
164 {
165+ auto activate = true;
166+ if (vt_number <= 0)
167+ {
168+ vt_number = find_active_vt_number();
169+ activate = false;
170+ }
171+
172 std::stringstream vt_path_stream;
173 vt_path_stream << "/dev/tty" << vt_number;
174
175@@ -189,5 +197,18 @@
176 << boost::errinfo_errno(errno));
177 }
178
179+ if (activate)
180+ {
181+ auto status = fops->ioctl(vt_fd, VT_ACTIVATE, vt_number);
182+ if (status < 0)
183+ {
184+ BOOST_THROW_EXCEPTION(
185+ boost::enable_error_info(
186+ std::runtime_error("Failed to activate VT"))
187+ << boost::errinfo_file_name(active_vt_path)
188+ << boost::errinfo_errno(errno));
189+ }
190+ }
191+
192 return vt_fd;
193 }
194
195=== modified file 'src/server/graphics/gbm/linux_virtual_terminal.h'
196--- src/server/graphics/gbm/linux_virtual_terminal.h 2013-04-25 09:48:54 +0000
197+++ src/server/graphics/gbm/linux_virtual_terminal.h 2013-06-21 01:45:33 +0000
198@@ -56,6 +56,7 @@
199 {
200 public:
201 LinuxVirtualTerminal(std::shared_ptr<VTFileOperations> const& fops,
202+ int vt_number,
203 std::shared_ptr<DisplayReport> const& report);
204 ~LinuxVirtualTerminal() noexcept(true);
205
206
207=== modified file 'tests/integration-tests/graphics/android/test_internal_client.cpp'
208--- tests/integration-tests/graphics/android/test_internal_client.cpp 2013-06-12 16:22:17 +0000
209+++ tests/integration-tests/graphics/android/test_internal_client.cpp 2013-06-21 01:45:33 +0000
210@@ -34,6 +34,7 @@
211 #include "mir/shell/surface_creation_parameters.h"
212 #include "mir/frontend/surface_id.h"
213 #include "mir/input/input_channel_factory.h"
214+#include "mir/options/program_option.h"
215
216 #include "mir_test_doubles/stub_input_registrar.h"
217
218@@ -52,6 +53,7 @@
219 namespace mf=mir::frontend;
220 namespace mi=mir::input;
221 namespace mtd=mir::test::doubles;
222+namespace mo=mir::options;
223
224 namespace
225 {
226@@ -95,8 +97,9 @@
227 auto surface_source = std::make_shared<msh::SurfaceSource>(surface_controller);
228 auto mir_surface = surface_source->create_surface(params, id, std::shared_ptr<mir::events::EventSink>());
229
230+ auto options = std::shared_ptr<mo::ProgramOption>();
231 auto report = std::shared_ptr<mg::NullDisplayReport>();
232- auto platform = mg::create_platform(report);
233+ auto platform = mg::create_platform(options, report);
234 auto internal_client = platform->create_internal_client();
235
236 int major, minor, n;
237
238=== modified file 'tests/integration-tests/graphics/gbm/test_buffer_integration.cpp'
239--- tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-06-20 08:27:10 +0000
240+++ tests/integration-tests/graphics/gbm/test_buffer_integration.cpp 2013-06-21 01:45:33 +0000
241@@ -100,7 +100,7 @@
242 auto options = mtf::TestingServerConfiguration().the_options();
243
244 if (options->get("tests-use-real-graphics", false))
245- platform = mg::create_platform(std::make_shared<mg::NullDisplayReport>());
246+ platform = mg::create_platform(options, std::make_shared<mg::NullDisplayReport>());
247 else
248 platform = std::make_shared<StubGraphicPlatform>();
249
250
251=== modified file 'tests/unit-tests/graphics/android/test_android_platform.cpp'
252--- tests/unit-tests/graphics/android/test_android_platform.cpp 2013-05-17 18:48:07 +0000
253+++ tests/unit-tests/graphics/android/test_android_platform.cpp 2013-06-21 01:45:33 +0000
254@@ -19,6 +19,7 @@
255 #include "mir/graphics/null_display_report.h"
256 #include "src/server/graphics/android/android_platform.h"
257 #include "mir/compositor/buffer_ipc_packer.h"
258+#include "mir/options/program_option.h"
259 #include "mir_test_doubles/mock_buffer.h"
260 #include "mir_test_doubles/mock_buffer_packer.h"
261 #include <system/window.h>
262@@ -28,6 +29,7 @@
263 namespace mga=mir::graphics::android;
264 namespace mtd=mir::test::doubles;
265 namespace geom=mir::geometry;
266+namespace mo=mir::options;
267
268 class PlatformBufferIPCPackaging : public ::testing::Test
269 {
270@@ -81,7 +83,7 @@
271 EXPECT_CALL(*mock_buffer, stride())
272 .WillOnce(testing::Return(dummy_stride));
273
274- auto platform = mg::create_platform(stub_display_report);
275+ auto platform = mg::create_platform(std::make_shared<mo::ProgramOption>(), stub_display_report);
276
277 auto mock_packer = std::make_shared<mtd::MockPacker>();
278 int offset = 0;
279
280=== modified file 'tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp'
281--- tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp 2013-04-18 12:56:58 +0000
282+++ tests/unit-tests/graphics/gbm/test_linux_virtual_terminal.cpp 2013-06-21 01:45:33 +0000
283@@ -115,7 +115,7 @@
284 .WillOnce(Return(0));
285 }
286
287- void set_up_expectations_for_vt_setup(int vt_num)
288+ void set_up_expectations_for_vt_setup(int vt_num, bool activate)
289 {
290 using namespace testing;
291
292@@ -125,6 +125,10 @@
293 EXPECT_CALL(mock_fops, open(StrEq(ss.str()), _))
294 .WillOnce(Return(fake_vt_fd));
295
296+ if (activate)
297+ EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_ACTIVATE, vt_num))
298+ .WillOnce(Return(0));
299+
300 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, KDGETMODE, An<void*>()))
301 .WillOnce(DoAll(SetIoctlPointee<int>(fake_kd_mode), Return(0)));
302 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_GETMODE, An<void*>()))
303@@ -162,6 +166,23 @@
304 };
305
306
307+TEST_F(LinuxVirtualTerminalTest, use_provided_vt)
308+{
309+ using namespace testing;
310+
311+ int const vt_num{7};
312+
313+ InSequence s;
314+
315+ set_up_expectations_for_vt_setup(vt_num, true);
316+ set_up_expectations_for_vt_teardown();
317+
318+ auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
319+ auto null_report = std::make_shared<mg::NullDisplayReport>();
320+
321+ mgg::LinuxVirtualTerminal vt{fops, vt_num, null_report};
322+}
323+
324 TEST_F(LinuxVirtualTerminalTest, sets_up_current_vt)
325 {
326 using namespace testing;
327@@ -171,13 +192,13 @@
328 InSequence s;
329
330 set_up_expectations_for_current_vt_search(vt_num);
331- set_up_expectations_for_vt_setup(vt_num);
332+ set_up_expectations_for_vt_setup(vt_num, false);
333 set_up_expectations_for_vt_teardown();
334
335 auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
336 auto null_report = std::make_shared<mg::NullDisplayReport>();
337
338- mgg::LinuxVirtualTerminal vt{fops, null_report};
339+ mgg::LinuxVirtualTerminal vt{fops, 0, null_report};
340 }
341
342 TEST_F(LinuxVirtualTerminalTest, failure_to_find_current_vt_throws)
343@@ -203,7 +224,7 @@
344 auto null_report = std::make_shared<mg::NullDisplayReport>();
345
346 EXPECT_THROW({
347- mgg::LinuxVirtualTerminal vt(fops, null_report);
348+ mgg::LinuxVirtualTerminal vt(fops, 0, null_report);
349 }, std::runtime_error);
350 }
351
352@@ -216,7 +237,7 @@
353 InSequence s;
354
355 set_up_expectations_for_current_vt_search(vt_num);
356- set_up_expectations_for_vt_setup(vt_num);
357+ set_up_expectations_for_vt_setup(vt_num, false);
358
359 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, KDSETMODE, KD_GRAPHICS))
360 .WillOnce(Return(0));
361@@ -226,7 +247,7 @@
362 auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
363 auto null_report = std::make_shared<mg::NullDisplayReport>();
364
365- mgg::LinuxVirtualTerminal vt(fops, null_report);
366+ mgg::LinuxVirtualTerminal vt(fops, 0, null_report);
367 vt.set_graphics_mode();
368 }
369
370@@ -239,7 +260,7 @@
371 InSequence s;
372
373 set_up_expectations_for_current_vt_search(vt_num);
374- set_up_expectations_for_vt_setup(vt_num);
375+ set_up_expectations_for_vt_setup(vt_num, false);
376
377 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, KDSETMODE, KD_GRAPHICS))
378 .WillOnce(Return(-1));
379@@ -249,7 +270,7 @@
380 auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
381 auto null_report = std::make_shared<mg::NullDisplayReport>();
382
383- mgg::LinuxVirtualTerminal vt(fops, null_report);
384+ mgg::LinuxVirtualTerminal vt(fops, 0, null_report);
385 EXPECT_THROW({
386 vt.set_graphics_mode();
387 }, std::runtime_error);
388@@ -265,14 +286,14 @@
389 InSequence s;
390
391 set_up_expectations_for_current_vt_search(vt_num);
392- set_up_expectations_for_vt_setup(vt_num);
393+ set_up_expectations_for_vt_setup(vt_num, false);
394 set_up_expectations_for_switch_handler(SIGUSR1);
395 set_up_expectations_for_vt_teardown();
396
397 auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
398 auto null_report = std::make_shared<mg::NullDisplayReport>();
399
400- mgg::LinuxVirtualTerminal vt(fops, null_report);
401+ mgg::LinuxVirtualTerminal vt(fops, 0, null_report);
402
403 auto null_handler = [] { return true; };
404 vt.register_switch_handlers(mock_main_loop, null_handler, null_handler);
405@@ -288,7 +309,7 @@
406 InSequence s;
407
408 set_up_expectations_for_current_vt_search(vt_num);
409- set_up_expectations_for_vt_setup(vt_num);
410+ set_up_expectations_for_vt_setup(vt_num, false);
411 set_up_expectations_for_switch_handler(SIGUSR1);
412
413 EXPECT_CALL(mock_fops, ioctl(fake_vt_fd, VT_RELDISP, allow_switch));
414@@ -298,7 +319,7 @@
415 auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
416 auto null_report = std::make_shared<mg::NullDisplayReport>();
417
418- mgg::LinuxVirtualTerminal vt(fops, null_report);
419+ mgg::LinuxVirtualTerminal vt(fops, 0, null_report);
420
421 auto succeeding_handler = [] { return true; };
422 vt.register_switch_handlers(mock_main_loop, succeeding_handler, succeeding_handler);
423@@ -318,7 +339,7 @@
424 InSequence s;
425
426 set_up_expectations_for_current_vt_search(vt_num);
427- set_up_expectations_for_vt_setup(vt_num);
428+ set_up_expectations_for_vt_setup(vt_num, false);
429 set_up_expectations_for_switch_handler(SIGUSR1);
430
431 /* First switch away attempt */
432@@ -335,7 +356,7 @@
433
434 auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
435
436- mgg::LinuxVirtualTerminal vt(fops, mt::fake_shared(mock_report));
437+ mgg::LinuxVirtualTerminal vt(fops, 0, mt::fake_shared(mock_report));
438
439 auto failing_handler = [] { return false; };
440 vt.register_switch_handlers(mock_main_loop, failing_handler, failing_handler);
441@@ -357,7 +378,7 @@
442 InSequence s;
443
444 set_up_expectations_for_current_vt_search(vt_num);
445- set_up_expectations_for_vt_setup(vt_num);
446+ set_up_expectations_for_vt_setup(vt_num, false);
447 set_up_expectations_for_switch_handler(SIGUSR1);
448
449 /* Switch away */
450@@ -371,7 +392,7 @@
451
452 auto fops = mt::fake_shared<mgg::VTFileOperations>(mock_fops);
453
454- mgg::LinuxVirtualTerminal vt(fops, mt::fake_shared(mock_report));
455+ mgg::LinuxVirtualTerminal vt(fops, 0, mt::fake_shared(mock_report));
456
457 auto succeeding_handler = [] { return true; };
458 auto failing_handler = [] { return false; };
459
460=== modified file 'tests/unit-tests/graphics/test_graphics_platform.cpp'
461--- tests/unit-tests/graphics/test_graphics_platform.cpp 2013-05-20 15:55:48 +0000
462+++ tests/unit-tests/graphics/test_graphics_platform.cpp 2013-06-21 01:45:33 +0000
463@@ -32,6 +32,7 @@
464 #endif
465 #include "mir/graphics/buffer_initializer.h"
466 #include "mir/logging/dumb_console_logger.h"
467+#include "mir/options/program_option.h"
468
469 #include "mir/graphics/null_display_report.h"
470
471@@ -42,6 +43,7 @@
472 namespace ml = mir::logging;
473 namespace geom = mir::geometry;
474 namespace mtd = mir::test::doubles;
475+namespace mo = mir::options;
476
477 class GraphicsPlatform : public ::testing::Test
478 {
479@@ -75,7 +77,7 @@
480 std::shared_ptr<mg::Platform> create_platform()
481 {
482 #ifdef ANDROID
483- return mg::create_platform(std::make_shared<mg::NullDisplayReport>());
484+ return mg::create_platform(std::make_shared<mo::ProgramOption>(), std::make_shared<mg::NullDisplayReport>());
485 #else
486 return std::make_shared<mg::gbm::GBMPlatform>(
487 std::make_shared<mg::NullDisplayReport>(),

Subscribers

People subscribed via source and target branches