From 173c318dd32bfacb4333b27917924e2705c1bb84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Tue, 19 Aug 2025 15:48:28 +0200 Subject: [PATCH] Add test script for thingclasses --- server/main.cpp | 2 +- tests/scripts/getthingclasses.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 tests/scripts/getthingclasses.sh diff --git a/server/main.cpp b/server/main.cpp index dd653176..dd1030a9 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -235,7 +235,7 @@ int main(int argc, char *argv[]) // If running in a snappy environment, print out some details about it. - if (!qgetenv("SNAP").isEmpty()) { + if (!qEnvironmentVariableIsEmpty("SNAP")) { // Note: http://snapcraft.io/docs/reference/env qCInfo(dcApplication()) << "Snap name :" << qgetenv("SNAP_NAME"); qCInfo(dcApplication()) << "Snap version :" << qgetenv("SNAP_VERSION"); diff --git a/tests/scripts/getthingclasses.sh b/tests/scripts/getthingclasses.sh new file mode 100755 index 00000000..bdcbaa51 --- /dev/null +++ b/tests/scripts/getthingclasses.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +if [ -z $1 ]; then + echo "usage: $0 host " + exit 1 +fi + +if [ -z $2 ]; then +cat <