Signed-off-by: Chase Douglas <[email protected]>
---
include/xorg/gtest/environment.h | 5 +++++
src/environment.cpp | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/include/xorg/gtest/environment.h b/include/xorg/gtest/environment.h
index 55b590d..e113cd7 100644
--- a/include/xorg/gtest/environment.h
+++ b/include/xorg/gtest/environment.h
@@ -139,6 +139,11 @@ class Environment : public ::testing::Environment {
*/
int display() const;
+ /**
+ * Kill the dummy Xorg server with SIGKILL.
+ */
+ void Kill();
+
protected:
/**
* Starts the dummy X server.
diff --git a/src/environment.cpp b/src/environment.cpp
index f4bb9e1..c1c4d80 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -152,3 +152,9 @@ void xorg::testing::Environment::TearDown() {
<< std::strerror(errno) << "\n";
}
}
+
+void xorg::testing::Environment::Kill() {
+ if (!d_->process.Kill())
+ std::cerr << "Warning: Failed to kill dummy Xorg server: "
+ << std::strerror(errno) << "\n";
+}
--
1.7.9.1
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel