Mir

Merge lp:~afrantzis/mir/remove-DefaultDisplayServerTestFixture into lp:mir

Proposed by Alexandros Frantzis
Status: Work in progress
Proposed branch: lp:~afrantzis/mir/remove-DefaultDisplayServerTestFixture
Merge into: lp:mir
Diff against target: 112 lines (+0/-69)
3 files modified
tests/include/mir_test_framework/display_server_test_fixture.h (+0/-21)
tests/integration-tests/test_test_framework.cpp (+0/-16)
tests/mir_test_framework/display_server_test_fixture.cpp (+0/-32)
To merge this branch: bzr merge lp:~afrantzis/mir/remove-DefaultDisplayServerTestFixture
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Mir development team Pending
Review via email: mp+261709@code.launchpad.net

Commit message

tests: Remove unused DefaultDisplayServerTestFixture test framework class

This removal also eliminates a few fd leaks, which were indirectly caused by the static members of DefaultDisplayServerTestFixture.

Description of the change

tests: Remove unused DefaultDisplayServerTestFixture test framework class

This removal also eliminates a few fd leaks, which were indirectly caused by the static members of DefaultDisplayServerTestFixture.

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
Alexandros Frantzis (afrantzis) wrote :

> BespokeDisplayServerTestFixture.starting_display_server_starts_input_manager
> /bin/bash: line 1: 9109 Segmentation fault (core dumped) umockdev-run -- mir_integration_tests

Strange...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

2654. By Alexandros Frantzis

tests: Remove unused DefaultDisplayServerTestFixture test framework class

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/include/mir_test_framework/display_server_test_fixture.h'
2--- tests/include/mir_test_framework/display_server_test_fixture.h 2015-01-21 07:34:50 +0000
3+++ tests/include/mir_test_framework/display_server_test_fixture.h 2015-06-11 10:59:01 +0000
4@@ -33,26 +33,6 @@
5 using namespace ::mir;
6
7 // The test fixture sets up and tears down a display server for use
8-// in display server test cases.
9-class DefaultDisplayServerTestFixture : public testing::Test
10-{
11-public:
12- DefaultDisplayServerTestFixture();
13- ~DefaultDisplayServerTestFixture();
14-
15- static void SetUpTestCase();
16- static void TearDownTestCase();
17-
18- void launch_client_process(TestingClientConfiguration& config);
19-
20-private:
21- static TestingProcessManager process_manager;
22- static TestingServerConfiguration default_parameters;
23-
24- virtual void TearDown();
25-};
26-
27-// The test fixture sets up and tears down a display server for use
28 // in display server tests.
29 class BespokeDisplayServerTestFixture : public testing::Test
30 {
31@@ -83,7 +63,6 @@
32
33 }
34
35-using mir_test_framework::DefaultDisplayServerTestFixture;
36 using mir_test_framework::BespokeDisplayServerTestFixture;
37 using mir_test_framework::TestingClientConfiguration;
38 using mir_test_framework::TestingServerConfiguration;
39
40=== modified file 'tests/integration-tests/test_test_framework.cpp'
41--- tests/integration-tests/test_test_framework.cpp 2015-05-19 21:34:34 +0000
42+++ tests/integration-tests/test_test_framework.cpp 2015-06-11 10:59:01 +0000
43@@ -58,22 +58,6 @@
44 {
45 }
46
47-TEST_F(DefaultDisplayServerTestFixture, demonstrate_multiple_clients)
48-{
49- struct Client : TestingClientConfiguration
50- {
51- void exec()
52- {
53- SCOPED_TRACE("Demo Client");
54- }
55- } demo;
56-
57- for(int i = 0; i != 10; ++i)
58- {
59- launch_client_process(demo);
60- }
61-}
62-
63 namespace
64 {
65 struct DemoInProcessServer : mir_test_framework::InProcessServer
66
67=== modified file 'tests/mir_test_framework/display_server_test_fixture.cpp'
68--- tests/mir_test_framework/display_server_test_fixture.cpp 2015-01-21 07:34:50 +0000
69+++ tests/mir_test_framework/display_server_test_fixture.cpp 2015-06-11 10:59:01 +0000
70@@ -18,42 +18,10 @@
71
72 #include "mir_test_framework/display_server_test_fixture.h"
73 #include "mir_test_framework/testing_client_configuration.h"
74-#include "src/client/mir_connection.h"
75
76 namespace mc = mir::compositor;
77 namespace mtf = mir_test_framework;
78
79-mtf::TestingProcessManager mir_test_framework::DefaultDisplayServerTestFixture::process_manager;
80-mtf::TestingServerConfiguration mir_test_framework::DefaultDisplayServerTestFixture::default_parameters;
81-
82-void DefaultDisplayServerTestFixture::launch_client_process(TestingClientConfiguration& config)
83-{
84- process_manager.launch_client_process(config, *default_parameters.the_options());
85-}
86-
87-void DefaultDisplayServerTestFixture::SetUpTestCase()
88-{
89- process_manager.launch_server_process(default_parameters);
90-}
91-
92-
93-void DefaultDisplayServerTestFixture::TearDown()
94-{
95- process_manager.tear_down_clients();
96-}
97-
98-void DefaultDisplayServerTestFixture::TearDownTestCase()
99-{
100- process_manager.tear_down_server();
101-}
102-
103-DefaultDisplayServerTestFixture::DefaultDisplayServerTestFixture()
104-{
105-}
106-
107-DefaultDisplayServerTestFixture::~DefaultDisplayServerTestFixture() {}
108-
109-
110 void BespokeDisplayServerTestFixture::launch_server_process(TestingServerConfiguration& functor)
111 {
112 test_options = functor.the_options();

Subscribers

People subscribed via source and target branches