On Fri, Oct 26, 2012 at 09:30:51AM -0700, Chase Douglas wrote: > On Mon, Oct 22, 2012 at 7:02 PM, Peter Hutterer > <[email protected]> wrote: > > -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 <[email protected]> > > --- > > 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() { > > IIUC, this would require passing: > > --logfile "" > > That's a bit unwieldy, and it's a non-obvious way to cause no log > file. Perhaps we should have a different set of options: --no-logfile > and --no-config?
I've though of this again and rather than introducing new options that don't exist it's better to add XServer::RemoveOption(). Cheers, Peter _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
