mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 21:05:44 +03:00
Tests: Make independent of an hardcoded path, rather use CMAKE_BINARY_DIR.
This commit is contained in:
parent
92513207eb
commit
579e24be10
3 changed files with 9 additions and 2 deletions
|
@ -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 "")
|
||||
|
|
3
test/oc_bin.h.in
Normal file
3
test/oc_bin.h.in
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
#define OWNCLOUD_BIN "@CMAKE_BINARY_DIR@/bin/owncloud"
|
||||
|
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue