From: Dominik Schmidt Date: Mon, 14 Dec 2020 14:37:05 +0000 (+0100) Subject: Use owncloudcmd in testVersionOfInstalledBinary X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~446^2~6 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=67f98903203c3f42c65a62ba2057d12cf6c2d4fa;p=nextcloud-desktop.git Use owncloudcmd in testVersionOfInstalledBinary ... as it works without X in CI. --- diff --git a/test/testutility.cpp b/test/testutility.cpp index aa21ed788..eed1c2b90 100644 --- a/test/testutility.cpp +++ b/test/testutility.cpp @@ -8,6 +8,7 @@ #include #include "common/utility.h" +#include "config.h" using namespace OCC::Utility; @@ -115,13 +116,11 @@ private slots: void testVersionOfInstalledBinary() { if (isLinux()) { - if (qgetenv("DISPLAY").isEmpty()) { - // Current requires an X-Server - return; - } - // pass the binary name owncloud to the next call. This brakes branding, - // but branding is not supposed to work with this. - QString ver = versionOfInstalledBinary(OWNCLOUD_BIN_PATH + QLatin1String("/nextcloud")); + // pass the cmd client from our build dir + // this is a bit inaccurate as it does not test the "real thing" + // but cmd and gui have the same --version handler by now + // and cmd works without X in CI + QString ver = versionOfInstalledBinary(QStringLiteral(OWNCLOUD_BIN_PATH "/" APPLICATION_EXECUTABLE "cmd")); qDebug() << "Version of installed Nextcloud: " << ver; QVERIFY(!ver.isEmpty());