mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-29 12:45:28 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d38d22270 | ||
|
|
de007176d5 |
@@ -504,7 +504,11 @@ endif()
|
|||||||
# --- End of section ---
|
# --- End of section ---
|
||||||
|
|
||||||
add_subdirectory(plugins)
|
add_subdirectory(plugins)
|
||||||
add_subdirectory(tests)
|
|
||||||
|
option(ADVSS_ENABLE_TESTS "Build advanced-scene-switcher unit tests" OFF)
|
||||||
|
if(ADVSS_ENABLE_TESTS)
|
||||||
|
add_subdirectory(tests)
|
||||||
|
endif()
|
||||||
|
|
||||||
# --- Install ---
|
# --- Install ---
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
"description": "Build for macOS 11.0+ (Universal binary) for CI",
|
"description": "Build for macOS 11.0+ (Universal binary) for CI",
|
||||||
"generator": "Xcode",
|
"generator": "Xcode",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -69,7 +70,8 @@
|
|||||||
"displayName": "Windows x64 CI build",
|
"displayName": "Windows x64 CI build",
|
||||||
"description": "Build for Windows x64 on CI",
|
"description": "Build for Windows x64 on CI",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -97,7 +99,8 @@
|
|||||||
"description": "Build for Linux x86_64 on CI",
|
"description": "Build for Linux x86_64 on CI",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -125,7 +128,8 @@
|
|||||||
"description": "Build for Linux aarch64 on CI",
|
"description": "Build for Linux aarch64 on CI",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,7 +13,10 @@ using advss::MacroConditionFile;
|
|||||||
static void writeFile(const QString &path, const QString &content)
|
static void writeFile(const QString &path, const QString &content)
|
||||||
{
|
{
|
||||||
QFile f(path);
|
QFile f(path);
|
||||||
f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate);
|
if (!f.open(QIODevice::WriteOnly | QIODevice::Text |
|
||||||
|
QIODevice::Truncate)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
QTextStream(&f) << content;
|
QTextStream(&f) << content;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +158,9 @@ TEST_CASE("DATE_CHANGE: triggers when modification date changes",
|
|||||||
// Explicitly set the modification time to a known future value so the
|
// Explicitly set the modification time to a known future value so the
|
||||||
// test is not sensitive to filesystem mtime resolution.
|
// test is not sensitive to filesystem mtime resolution.
|
||||||
QFile f(path);
|
QFile f(path);
|
||||||
f.open(QIODevice::ReadWrite);
|
if (!f.open(QIODevice::ReadWrite)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
f.setFileTime(QDateTime::currentDateTime().addSecs(10),
|
f.setFileTime(QDateTime::currentDateTime().addSecs(10),
|
||||||
QFileDevice::FileModificationTime);
|
QFileDevice::FileModificationTime);
|
||||||
f.close();
|
f.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user