[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kstars/KDE/4.12] Tests: tests: always the system temporary dir
From:       Pino Toscano <pino () kde ! org>
Date:       2013-11-30 19:09:49
Message-ID: E1VmpvJ-0001WG-Ll () scm ! kde ! org
[Download RAW message or body]

Git commit 64748ed5e45177224699c4f597d81d6cae3bfcdc by Pino Toscano.
Committed on 30/11/2013 at 19:08.
Pushed by pino into branch 'KDE/4.12'.

tests: always the system temporary dir

the KDE directory might need further directories in $HOME, which we
don't want to create; hence, force QDir::tempPath() as base directory
for the temporary files

M  +2    -0    Tests/testcsvparser.cpp
M  +2    -0    Tests/testfwparser.cpp

http://commits.kde.org/kstars/64748ed5e45177224699c4f597d81d6cae3bfcdc

diff --git a/Tests/testcsvparser.cpp b/Tests/testcsvparser.cpp
index e4b8bbc..806e105 100644
--- a/Tests/testcsvparser.cpp
+++ b/Tests/testcsvparser.cpp
@@ -25,6 +25,7 @@
 =

 #include "testcsvparser.h"
 =

+#include <QDir>
 #include <ktemporaryfile.h>
 =

 TestCSVParser::TestCSVParser(): QObject() {
@@ -85,6 +86,7 @@ void TestCSVParser::initTestCase() {
   test_cases_.append(",,,,,,,,,,,\n");
   test_cases_.append("\n");
   KTemporaryFile temp_file;
+  temp_file.setPrefix(QDir::tempPath() + "/");
   temp_file.setSuffix(".txt");
   temp_file.setAutoRemove(false);
   QVERIFY(temp_file.open());
diff --git a/Tests/testfwparser.cpp b/Tests/testfwparser.cpp
index 37f5c48..c30716c 100644
--- a/Tests/testfwparser.cpp
+++ b/Tests/testfwparser.cpp
@@ -17,6 +17,7 @@
 =

 #include "testfwparser.h"
 =

+#include <QDir>
 #include <ktemporaryfile.h>
 =

 TestFWParser::TestFWParser(): QObject() {
@@ -30,6 +31,7 @@ void TestFWParser::initTestCase() {
   test_cases_.append("this is an ex\n\n");
 =

   KTemporaryFile temp_file;
+  temp_file.setPrefix(QDir::tempPath() + "/");
   temp_file.setSuffix(".txt");
   temp_file.setAutoRemove(false);
   QVERIFY(temp_file.open());
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic