-logfile and -config are auto-filled for the default setup. A test that
needs no config file or the default log file must be able to unset those
defaults.

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/xserver.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/xserver.cpp b/src/xserver.cpp
index 55efab1..29c0430 100644
--- a/src/xserver.cpp
+++ b/src/xserver.cpp
@@ -496,7 +496,11 @@ void xorg::testing::XServer::RemoveLogFile(bool force) {
 }
 
 void xorg::testing::XServer::SetOption(const std::string &key, const 
std::string &value) {
-  d_->options[key] = value;
+  if (value.empty() &&
+      (key.compare("-logfile") == 0 || key.compare("-config") == 0)) {
+    d_->options.erase(key);
+  } else
+    d_->options[key] = value;
 }
 
 const std::string& xorg::testing::XServer::GetLogFilePath() {
-- 
1.7.11.7

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to