[Telepathy-commits] [telepathy-qt4/master] tests/key-file.cpp: chdir to the right directory if out-of-tree

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jan 8 11:38:30 PST 2009


---
 tests/key-file.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/key-file.cpp b/tests/key-file.cpp
index 892570f..48f7324 100644
--- a/tests/key-file.cpp
+++ b/tests/key-file.cpp
@@ -14,6 +14,11 @@ private Q_SLOTS:
 
 void TestKeyFile::testKeyFile()
 {
+    QString top_srcdir = QString::fromLocal8Bit(::getenv("abs_top_srcdir"));
+    if (!top_srcdir.isEmpty()) {
+        QDir::setCurrent(top_srcdir + "/tests");
+    }
+
     KeyFile defaultKeyFile;
     QCOMPARE(defaultKeyFile.status(), KeyFile::None);
 
-- 
1.5.6.5




More information about the Telepathy-commits mailing list