Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testing_server_configuration.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 
20 #ifndef MIR_TEST_TESTING_SERVER_CONFIGURATION_H_
21 #define MIR_TEST_TESTING_SERVER_CONFIGURATION_H_
22 
25 
26 namespace mir_test_framework
27 {
28 using namespace mir;
29 
31 {
32 public:
34 
35  // Code to run in server process
36  virtual void exec();
37 
38  // Code to run in server process after server starts
39  virtual void on_start();
40 
41  // Code to run in server process after server exits
42  virtual void on_exit();
43 
44  std::shared_ptr<mir::ServerStatusListener> the_server_status_listener() override;
45 
46  virtual std::string the_socket_file() const;
48 
49  virtual void wait_for_server_start();
50 
51 private:
52  CrossProcessSync server_started_sync;
53  bool using_server_started_sync;
54 };
55 
56 std::string const& test_socket_file();
57 }
58 
59 #endif /* MIR_TEST_TESTING_SERVER_CONFIGURATION_H_ */
Definition: cross_process_sync.h:28
std::shared_ptr< options::Option > the_options() const
Definition: default_server_configuration.cpp:61
Definition: testing_server_configuration.h:30
std::string const & test_socket_file()
stubs out the graphics and input subsystems to avoid tests failing where the hardware is not accessib...
Definition: stubbed_server_configuration.h:32

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014