summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-02-01 11:12:29 -0800
committerChase Douglas <chase.douglas@canonical.com>2012-02-01 11:22:57 -0800
commit79b2d4e7f976621705bd32a9fd16e56c989a5a45 (patch)
treec2b2cfd8cbf00d5299ea20ea355ef1640799d188 /include
parent656d8b22be42b23d5336a85173d7381bf115a327 (diff)
And by default point to a location that doesn't require root privileges to be used.
This will make it possible to run Xorg without being root. Signed-off-by: Daniel d'Andrada <daniel.dandrada@canonical.com>
Diffstat (limited to 'include')
-rw-r--r--include/xorg/gtest/environment.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/xorg/gtest/environment.h b/include/xorg/gtest/environment.h
index fd550e7..3996507 100644
--- a/include/xorg/gtest/environment.h
+++ b/include/xorg/gtest/environment.h
@@ -48,6 +48,7 @@ namespace testing {
* with the overall testing framework like
* @code
* std::string xorg_conf_path("conf/dummy.conf");
+ * std::string xorg_log_file_path("/tmp/MyDummyXorg.log");
* int xorg_display = 133;
* std::string server("Xorg");
*
@@ -55,6 +56,7 @@ namespace testing {
* xorg_conf_path,
* server,
* xorg_display);
+ * environment->set_log_file(xorg_log_file_path);
* testing::AddGlobalTestEnvironment(environment);
* @endcode
* or link to libxorg-gtest_main.
@@ -72,6 +74,19 @@ class Environment : public ::testing::Environment {
virtual ~Environment();
+ /**
+ * Sets the path where the xserver log file will be created.
+ * @param path_to_log_file Path to xserver logfile.
+ */
+ void set_log_file(const std::string& path_to_log_file);
+
+ /**
+ * Returns the path where the xserver log file will be created.
+ * Its default value is "/tmp/Xorg.GTest.log"
+ * @return Path to xserver logfile.
+ */
+ const std::string& log_file() const;
+
protected:
/**
* Starts the dummy X server.