Commit 4f161fa0 authored by Harald Sitter's avatar Harald Sitter 🌼

disable systeminfo test on systems without uname

since the test relies on uname (and the relevant code inside sysinfo
also conditions on uname) there is little point in building it on platforms
without uname e.g. windows.
parent fb50d436
......@@ -8,15 +8,17 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII)
find_package(Qt5Test ${REQUIRED_QT_VERSION} CONFIG REQUIRED)
# Test helper for systeminformationtest
add_executable(lsb_release lsb_release_double.c)
if(HAVE_UNAME)
add_executable(lsb_release lsb_release_double.c)
ecm_add_tests(
systeminformationtest
LINK_LIBRARIES
Qt5::Core
Qt5::Test
DrKonqiInternal
)
ecm_add_tests(
systeminformationtest
LINK_LIBRARIES
Qt5::Core
Qt5::Test
DrKonqiInternal
)
endif()
add_subdirectory(crashtest)
add_subdirectory(backtraceparsertest)
......
......@@ -24,10 +24,8 @@
#include <KCoreAddons>
#if HAVE_UNAME
# include <errno.h>
# include <sys/utsname.h>
#endif
#include <errno.h>
#include <sys/utsname.h>
#include <systeminformation.h>
......@@ -35,8 +33,6 @@ class SystemInformationTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
#if HAVE_UNAME
static int uname(utsname *buf)
{
strcpy(buf->sysname, "FreeBSD");
......@@ -44,7 +40,6 @@ private Q_SLOTS:
strcpy(buf->machine, "x86_64");
return 0;
}
#endif
void initTestCase()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment