Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
System
KSystemLog
Commits
625e1136
Commit
625e1136
authored
Jul 17, 2020
by
Hannah von Reth
Committed by
Hannah von Reth
Jul 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to execute unittests on Windows
parent
e7a37425
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
37 deletions
+20
-37
src/lib/globals.cpp
src/lib/globals.cpp
+2
-0
src/main.cpp
src/main.cpp
+0
-2
tests/CMakeLists.txt
tests/CMakeLists.txt
+11
-27
tests/kernelAnalyzerTest.cpp
tests/kernelAnalyzerTest.cpp
+0
-2
tests/kioLogFileReaderTest.cpp
tests/kioLogFileReaderTest.cpp
+0
-2
tests/logModeFactoryTest.cpp
tests/logModeFactoryTest.cpp
+0
-2
tests/systemAnalyzerTest.cpp
tests/systemAnalyzerTest.cpp
+0
-2
tests/testUtil.cpp
tests/testUtil.cpp
+7
-0
No files found.
src/lib/globals.cpp
View file @
625e1136
...
...
@@ -40,6 +40,8 @@
#include "logging.h"
Q_LOGGING_CATEGORY
(
KSYSTEMLOG
,
"ksystemlog"
,
QtWarningMsg
)
Globals
&
Globals
::
instance
()
{
static
Globals
self
;
...
...
src/main.cpp
View file @
625e1136
...
...
@@ -29,8 +29,6 @@
#include "mainWindow.h"
#include "logging.h"
Q_LOGGING_CATEGORY
(
KSYSTEMLOG
,
"ksystemlog"
,
QtWarningMsg
)
int
main
(
int
argc
,
char
**
argv
)
{
// Enable debug output:
...
...
tests/CMakeLists.txt
View file @
625e1136
...
...
@@ -12,35 +12,19 @@ include_directories(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../src/modes/kernel
)
add_library
(
testCore STATIC testUtil.cpp testResources.qrc
)
target_link_libraries
(
testCore PUBLIC
Qt5::Test
ksystemlog_lib
ksystemlog_base_mode
ksystemlog_config
ksystemlog_system
ksystemlog_kernel
)
macro
(
ksystemlog_unit_tests
)
foreach
(
unitTest
${
ARGN
}
)
set
(
unitTest_sources
${
unitTest
}
.cpp
testUtil.cpp
)
qt5_add_resources
(
unitTest_sources testResources.qrc
)
add_executable
(
${
unitTest
}
${
unitTest_sources
}
)
add_test
(
ksystemlog-
${
unitTest
}
${
unitTest
}
)
ecm_mark_as_test
(
${
unitTest
}
)
target_link_libraries
(
${
unitTest
}
Qt5::Test
ksystemlog_lib
ksystemlog_base_mode
ksystemlog_config
ksystemlog_system
ksystemlog_kernel
)
ecm_add_test
(
${
unitTest
}
.cpp TEST_NAME ksystemlog-
${
unitTest
}
LINK_LIBRARIES testCore
)
endforeach
(
unitTest
)
endmacro
(
ksystemlog_unit_tests
)
...
...
tests/kernelAnalyzerTest.cpp
View file @
625e1136
...
...
@@ -43,8 +43,6 @@
#include "kernelAnalyzer.h"
#include "localLogFileReader.h"
Q_LOGGING_CATEGORY
(
KSYSTEMLOG
,
"ksystemlog"
)
/**
* Reimplements the Kernel Analyzer using a Local File Reader
*/
...
...
tests/kioLogFileReaderTest.cpp
View file @
625e1136
...
...
@@ -33,8 +33,6 @@
#include "logging.h"
Q_LOGGING_CATEGORY
(
KSYSTEMLOG
,
"ksystemlog"
)
class
KioLogFileReaderTest
:
public
QObject
{
Q_OBJECT
...
...
tests/logModeFactoryTest.cpp
View file @
625e1136
...
...
@@ -34,8 +34,6 @@
#include "logging.h"
Q_LOGGING_CATEGORY
(
KSYSTEMLOG
,
"ksystemlog"
)
class
LogModeFactoryTest
:
public
QObject
{
Q_OBJECT
...
...
tests/systemAnalyzerTest.cpp
View file @
625e1136
...
...
@@ -41,8 +41,6 @@
#include "logging.h"
Q_LOGGING_CATEGORY
(
KSYSTEMLOG
,
"ksystemlog"
)
class
SystemAnalyzerTest
:
public
QObject
{
Q_OBJECT
...
...
tests/testUtil.cpp
View file @
625e1136
...
...
@@ -35,6 +35,13 @@
#include "logViewWidget.h"
#include "analyzer.h"
static
void
enableLoggign
()
{
KSYSTEMLOG
().
setFilterRules
(
QStringLiteral
(
"ksystemlog=true"
));
Q_INIT_RESOURCE
(
testResources
);
}
Q_COREAPP_STARTUP_FUNCTION
(
enableLoggign
)
TestUtil
::
TestUtil
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment