diff options
author | Chase Douglas <chase.douglas@ubuntu.com> | 2011-12-07 12:38:04 -0800 |
---|---|---|
committer | Chase Douglas <chase.douglas@ubuntu.com> | 2011-12-07 12:38:04 -0800 |
commit | 3aea1bbbbb7f7ab8a76cdbfc110fa9c5ed14ae25 (patch) | |
tree | 8f6b4071d8873e9d71abea4a0bff914a7d817222 /src/environment.cpp | |
parent | 4f083dd6a3ea2473913d23aecf4d06f664f95bce (diff) |
Add server executable path option so one can test different servers
Also, fix issues with the main option parsing code.
Diffstat (limited to 'src/environment.cpp')
-rw-r--r-- | src/environment.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/environment.cpp b/src/environment.cpp index 082ceb7..60d4c3b 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -36,13 +36,17 @@ struct xorg::testing::Environment::Private { std::string path_to_conf; + std::string path_to_server; int display; Process process; }; -xorg::testing::Environment::Environment(const std::string& path, int display) +xorg::testing::Environment::Environment(const std::string& path_to_conf, + const std::string& path_to_server, + int display) : d_(new Private) { - d_->path_to_conf = path; + d_->path_to_conf = path_to_conf; + d_->path_to_server = path_to_server; d_->display = display; } @@ -54,8 +58,8 @@ void xorg::testing::Environment::SetUp() { static char display_string[6]; snprintf(display_string, 6, ":%d", d_->display); - d_->process.Start("Xorg", "Xorg", display_string, "-config", - d_->path_to_conf.c_str(), NULL); + d_->process.Start(d_->path_to_server.c_str(), d_->path_to_server.c_str(), + display_string, "-config", d_->path_to_conf.c_str(), NULL); setenv("DISPLAY", display_string, true); |