mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Remove WITH_GUI_TESTS exclusion for CLI tests (#6946)
Apparently this exclusion was only relevant for Linux systems not running X, which was already handled dynamically in the testClip function. The CLI tests will now run by default will all the other core tests.
This commit is contained in:
@@ -236,11 +236,9 @@ if(WITH_XC_BROWSER)
|
|||||||
LIBS ${TEST_LIBRARIES})
|
LIBS ${TEST_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_unit_test(NAME testcli SOURCES TestCli.cpp
|
||||||
|
LIBS testsupport cli ${TEST_LIBRARIES})
|
||||||
|
|
||||||
if(WITH_GUI_TESTS)
|
if(WITH_GUI_TESTS)
|
||||||
# CLI clip tests need X environment on Linux
|
|
||||||
add_unit_test(NAME testcli SOURCES TestCli.cpp
|
|
||||||
LIBS testsupport cli ${TEST_LIBRARIES})
|
|
||||||
|
|
||||||
add_subdirectory(gui)
|
add_subdirectory(gui)
|
||||||
endif(WITH_GUI_TESTS)
|
endif(WITH_GUI_TESTS)
|
||||||
|
|||||||
@@ -437,6 +437,10 @@ void TestCli::testAnalyze()
|
|||||||
|
|
||||||
void TestCli::testClip()
|
void TestCli::testClip()
|
||||||
{
|
{
|
||||||
|
if (QProcessEnvironment::systemEnvironment().contains("WAYLAND_DISPLAY")) {
|
||||||
|
QSKIP("Clip test skipped due to QClipboard and Wayland issues on Linux");
|
||||||
|
}
|
||||||
|
|
||||||
QClipboard* clipboard = QGuiApplication::clipboard();
|
QClipboard* clipboard = QGuiApplication::clipboard();
|
||||||
clipboard->clear();
|
clipboard->clear();
|
||||||
|
|
||||||
@@ -449,10 +453,6 @@ void TestCli::testClip()
|
|||||||
execCmd(clipCmd, {"clip", m_dbFile->fileName(), "/Sample Entry", "0"});
|
execCmd(clipCmd, {"clip", m_dbFile->fileName(), "/Sample Entry", "0"});
|
||||||
QString errorOutput(m_stderr->readAll());
|
QString errorOutput(m_stderr->readAll());
|
||||||
|
|
||||||
if (QProcessEnvironment::systemEnvironment().contains("WAYLAND_DISPLAY")) {
|
|
||||||
QSKIP("Clip test skipped due to QClipboard and Wayland issues");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (errorOutput.contains("Unable to start program")
|
if (errorOutput.contains("Unable to start program")
|
||||||
|| errorOutput.contains("No program defined for clipboard manipulation")) {
|
|| errorOutput.contains("No program defined for clipboard manipulation")) {
|
||||||
QSKIP("Clip test skipped due to missing clipboard tool");
|
QSKIP("Clip test skipped due to missing clipboard tool");
|
||||||
|
|||||||
Reference in New Issue
Block a user