[Pkg-owncloud-commits] [owncloud-client] 417/498: Tests: Make independent of an hardcoded path, rather use CMAKE_BINARY_DIR.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 579e24be10cbfaea04449ebc63fe87e6ea5d6cb9
Author: Klaas Freitag <freitag at owncloud.com>
Date: Fri Jul 31 15:28:31 2015 +0200
Tests: Make independent of an hardcoded path, rather use CMAKE_BINARY_DIR.
---
test/CMakeLists.txt | 2 ++
test/oc_bin.h.in | 3 +++
test/testutility.h | 6 ++++--
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b92f3a6..cff057e 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -25,6 +25,8 @@ if( UNIX AND NOT APPLE )
owncloud_add_test(InotifyWatcher "${FolderWatcher_SRC}")
endif(UNIX AND NOT APPLE)
+configure_file(oc_bin.h.in oc_bin.h)
+
owncloud_add_test(CSyncSqlite "")
owncloud_add_test(NetrcParser ../src/cmd/netrcparser.cpp)
owncloud_add_test(OwnSql "")
diff --git a/test/oc_bin.h.in b/test/oc_bin.h.in
new file mode 100644
index 0000000..4af6176
--- /dev/null
+++ b/test/oc_bin.h.in
@@ -0,0 +1,3 @@
+
+#define OWNCLOUD_BIN "@CMAKE_BINARY_DIR@/bin/owncloud"
+
diff --git a/test/testutility.h b/test/testutility.h
index 022db10..87c1351 100644
--- a/test/testutility.h
+++ b/test/testutility.h
@@ -11,6 +11,8 @@
#include "utility.h"
+#include "oc_bin.h"
+
using namespace OCC::Utility;
class TestUtility : public QObject
@@ -107,9 +109,9 @@ private slots:
void testVersionOfInstalledBinary()
{
if( isLinux() ) {
- QString ver = versionOfInstalledBinary("/home/kf/owncloud.com/buildmirall/bin/owncloud");
+ QString ver = versionOfInstalledBinary(OWNCLOUD_BIN);
qDebug() << "Version of installed ownCloud Binary: " << ver;
- QVERIFY( !ver.isEmpty());
+ QVERIFY( !ver.isEmpty());
} else {
QVERIFY( versionOfInstalledBinary().isEmpty());
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list