mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 08:22:33 +02:00
Add doctest and google benchmark
This commit is contained in:
parent
92e781afc9
commit
536d2623c1
@ -91,6 +91,41 @@ build:linux_release:
|
|||||||
paths:
|
paths:
|
||||||
- build-x64-linux-release/bin/
|
- build-x64-linux-release/bin/
|
||||||
|
|
||||||
|
test:windows_debug:
|
||||||
|
stage: test
|
||||||
|
tags:
|
||||||
|
- windows10
|
||||||
|
- vs2019
|
||||||
|
dependencies:
|
||||||
|
- build:windows_debug
|
||||||
|
needs:
|
||||||
|
- build:windows_debug
|
||||||
|
script:
|
||||||
|
- ./build-x64-window-debug/bin/ScreenPlay.exe --no-run=false --exit=true --reporters=junit --out=test-report-junit.xml
|
||||||
|
artifacts:
|
||||||
|
expire_in: '4 weeks'
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: test-report-junit.xml
|
||||||
|
|
||||||
|
test:windows_release:
|
||||||
|
stage: test
|
||||||
|
tags:
|
||||||
|
- windows10
|
||||||
|
- vs2019
|
||||||
|
dependencies:
|
||||||
|
- build:windows_release
|
||||||
|
needs:
|
||||||
|
- build:windows_release
|
||||||
|
script:
|
||||||
|
- ./build-x64-window-release/bin/ScreenPlay.exe --no-run=false --exit=true --reporters=junit --out=test-report-junit.xml
|
||||||
|
artifacts:
|
||||||
|
expire_in: '4 weeks'
|
||||||
|
when: always
|
||||||
|
reports:
|
||||||
|
junit: test-report-junit.xml
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
build_docs:
|
build_docs:
|
||||||
stage: .post
|
stage: .post
|
||||||
|
@ -11,6 +11,9 @@ find_package(
|
|||||||
REQUIRED)
|
REQUIRED)
|
||||||
|
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
find_package(benchmark CONFIG REQUIRED)
|
||||||
|
find_package(doctest CONFIG REQUIRED)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
find_package(sentry CONFIG REQUIRED)
|
find_package(sentry CONFIG REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
@ -86,7 +89,17 @@ endif()
|
|||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")
|
target_compile_definitions(${PROJECT_NAME} PRIVATE "GIT_VERSION=${GIT_VERSION}")
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt5::Quick Qt5::Gui Qt5::Widgets Qt5::Core Qt5::WebEngine ScreenPlaySDK)
|
target_link_libraries(
|
||||||
|
${PROJECT_NAME}
|
||||||
|
PRIVATE Qt5::Quick
|
||||||
|
Qt5::Gui
|
||||||
|
Qt5::Widgets
|
||||||
|
Qt5::Core
|
||||||
|
Qt5::WebEngine
|
||||||
|
ScreenPlaySDK
|
||||||
|
benchmark::benchmark
|
||||||
|
benchmark::benchmark_main
|
||||||
|
doctest::doctest)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE sentry::sentry)
|
target_link_libraries(${PROJECT_NAME} PRIVATE sentry::sentry)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "screenplaymanager.h"
|
#include "screenplaymanager.h"
|
||||||
#include <QScopeGuard>
|
#include <QScopeGuard>
|
||||||
|
#include <doctest/doctest.h>
|
||||||
|
|
||||||
namespace ScreenPlay {
|
namespace ScreenPlay {
|
||||||
|
|
||||||
@ -18,7 +19,6 @@ namespace ScreenPlay {
|
|||||||
ScreenPlayManager::ScreenPlayManager(
|
ScreenPlayManager::ScreenPlayManager(
|
||||||
QObject* parent)
|
QObject* parent)
|
||||||
: QObject { parent }
|
: QObject { parent }
|
||||||
|
|
||||||
, m_server { std::make_unique<QLocalServer>() }
|
, m_server { std::make_unique<QLocalServer>() }
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -593,4 +593,10 @@ void ScreenPlayManager::loadProfiles()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE("Loads profiles.json")
|
||||||
|
{
|
||||||
|
GlobalVariables globalVariables;
|
||||||
|
ScreenPlayManager manager;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ chmod +x bootstrap-vcpkg.sh
|
|||||||
chmod +x vcpkg
|
chmod +x vcpkg
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
./vcpkg install openssl-unix sentry-native --triplet x64-osx --recurse
|
./vcpkg install openssl-unix sentry-native doctest benchmark --triplet x64-osx --recurse
|
||||||
else
|
else
|
||||||
./vcpkg install openssl-unix sentry-native --triplet x64-linux --recurse
|
./vcpkg install openssl-unix sentry-native doctest benchmark --triplet x64-linux --recurse
|
||||||
fi
|
fi
|
@ -10,7 +10,7 @@ git checkout 18ab4b72a26284f0df28295ce7bf9b21c96f20f4
|
|||||||
call bootstrap-vcpkg.bat
|
call bootstrap-vcpkg.bat
|
||||||
|
|
||||||
rem Install vcpkg dependencies
|
rem Install vcpkg dependencies
|
||||||
vcpkg.exe install openssl sentry-native --triplet x64-windows --recurse
|
vcpkg.exe install openssl sentry-native doctest benchmark --triplet x64-windows --recurse
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
cd ScreenPlay
|
cd ScreenPlay
|
||||||
|
Loading…
Reference in New Issue
Block a user