Advance Wayland and KDE package bring-up

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-04-14 10:51:06 +01:00
parent 51f3c21121
commit cf12defd28
15214 changed files with 20594243 additions and 269 deletions
@@ -0,0 +1,58 @@
if (QT_MAJOR_VERSION EQUAL "6")
set(QT_VERSION_OPT "-DBUILD_WITH_QT6=ON")
else()
set(QT_VERSION_OPT "-DBUILD_WITH_QT6=OFF")
endif()
macro(add_check NAME)
string(REPLACE "." "/" dir "${NAME}")
string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}")
add_test(
NAME ecm_add_tests-${NAME}
COMMAND
${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMAKE_CURRENT_SOURCE_DIR}/${dir}"
"${CMAKE_CURRENT_BINARY_DIR}/${dir}"
--build-two-config
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${proj}
--build-options -DBUILD_TESTING:BOOL=ON ${QT_VERSION_OPT}
${${NAME}_EXTRA_OPTIONS}
--test-command "${CMAKE_CTEST_COMMAND}"
)
add_test(
NAME ecm_add_tests_did_run-${NAME}
COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_SOURCE_DIR}/check_files.cmake" ${ARGN}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${dir}"
)
set_property(TEST ecm_add_tests_did_run-${NAME}
APPEND
PROPERTY DEPENDS "ecm_add_tests-${NAME}"
)
endmacro()
add_check(single_tests
test1.txt
test2.txt
test3.txt
test4.txt
test5.txt
test6.txt
test7_dir/test7.txt
)
add_check(multi_tests
test1.txt
test2.txt
test3.txt
test4.txt
test5.txt
test6.txt
test7.txt
test8.txt
test9.txt
test1011_dir/test10.txt
test1011_dir/test11.txt
)
@@ -0,0 +1,15 @@
set(i 0)
set(in_file_args FALSE)
while (i LESS CMAKE_ARGC)
if (in_file_args)
if (NOT EXISTS "${CMAKE_ARGV${i}}")
message(FATAL_ERROR "${CMAKE_ARGV${i}} does not exist")
endif()
elseif (CMAKE_ARGV${i} STREQUAL "-P")
# skip script name
math(EXPR i "${i} + 1")
set(in_file_args TRUE)
endif()
math(EXPR i "${i} + 1")
endwhile()
@@ -0,0 +1,196 @@
cmake_minimum_required(VERSION 3.5)
project(ECMAddTests)
set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules)
set(CMAKE_MODULE_PATH "${ECM_MODULE_DIR}")
add_library(testhelper STATIC ../testhelper.cpp)
target_include_directories(testhelper PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
# Link to QtCore for WinMain on Windows
include(QtVersionOption)
find_package(Qt${QT_MAJOR_VERSION}Core REQUIRED)
target_link_libraries(testhelper PUBLIC Qt${QT_MAJOR_VERSION}::Core)
enable_testing()
include(ECMAddTests)
include(../../test_helpers.cmake)
# clean up to avoid false-positives from check_files.cmake
file(REMOVE
"${CMAKE_CURRENT_BINARY_DIR}/test1.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test2.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test3.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test4.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test5.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test6.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test7.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test8.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test9.txt"
)
file(REMOVE_RECURSE
"${CMAKE_CURRENT_BINARY_DIR}/test1011_dir"
)
set(exp_target_names "test1;test2;test3")
set(exp_test_names "test1;test2;test3")
ecm_add_tests(
test1.cpp
test2.cpp
test3.cpp
LINK_LIBRARIES testhelper
TARGET_NAMES_VAR target_names
TEST_NAMES_VAR test_names
)
assert_vars_setequal(target_names exp_target_names)
assert_vars_setequal(test_names exp_test_names)
# check targets exist
get_property(_dummy TARGET test1 PROPERTY TYPE)
get_property(_dummy TARGET test2 PROPERTY TYPE)
get_property(_dummy TARGET test3 PROPERTY TYPE)
# check tests exists
get_property(_dummy TEST test1 PROPERTY TIMEOUT)
get_property(_dummy TEST test2 PROPERTY TIMEOUT)
get_property(_dummy TEST test3 PROPERTY TIMEOUT)
get_property(_is_win32 TARGET test1 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test1 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test1 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test1 is an OS/X bundle when it should not be")
endif()
get_property(_is_win32 TARGET test2 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test2 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test2 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test2 is an OS/X bundle when it should not be")
endif()
ecm_add_tests(
test4.cpp
test5.cpp
LINK_LIBRARIES testhelper
NAME_PREFIX pref_
)
get_property(_dummy TARGET test4 PROPERTY TYPE)
get_property(_dummy TARGET test5 PROPERTY TYPE)
get_property(_dummy TEST pref_test4 PROPERTY TIMEOUT)
get_property(_dummy TEST pref_test5 PROPERTY TIMEOUT)
get_property(_is_win32 TARGET test4 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test4 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test4 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test4 is an OS/X bundle when it should not be")
endif()
get_property(_is_win32 TARGET test5 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test5 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test5 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test5 is an OS/X bundle when it should not be")
endif()
ecm_add_tests(
test6.cpp
test7.cpp
LINK_LIBRARIES testhelper
GUI
)
get_property(_dummy TARGET test6 PROPERTY TYPE)
get_property(_dummy TARGET test7 PROPERTY TYPE)
get_property(_dummy TEST test6 PROPERTY TIMEOUT)
get_property(_dummy TEST test7 PROPERTY TIMEOUT)
get_property(_is_win32 TARGET test6 PROPERTY WIN32_EXECUTABLE)
if (NOT _is_win32)
message(FATAL_ERROR "test6 is not a WIN32 executable when it should be")
endif()
get_property(_is_bundle TARGET test6 PROPERTY MACOSX_BUNDLE)
if (NOT _is_bundle)
message(FATAL_ERROR "test6 is not an OS/X bundle when it should be")
endif()
get_property(_is_win32 TARGET test7 PROPERTY WIN32_EXECUTABLE)
if (NOT _is_win32)
message(FATAL_ERROR "test7 is not a WIN32 executable when it should be")
endif()
get_property(_is_bundle TARGET test7 PROPERTY MACOSX_BUNDLE)
if (NOT _is_bundle)
message(FATAL_ERROR "test7 is not an OS/X bundle when it should be")
endif()
set(exp_target_names "test8;test9")
set(exp_test_names "p_test8;p_test9")
ecm_add_tests(
test8.cpp
test9.cpp
LINK_LIBRARIES testhelper
NAME_PREFIX p_
GUI
TARGET_NAMES_VAR target_names
TEST_NAMES_VAR test_names
)
assert_vars_setequal(target_names exp_target_names)
assert_vars_setequal(test_names exp_test_names)
get_property(_dummy TARGET test8 PROPERTY TYPE)
get_property(_dummy TARGET test9 PROPERTY TYPE)
get_property(_dummy TEST p_test8 PROPERTY TIMEOUT)
get_property(_dummy TEST p_test9 PROPERTY TIMEOUT)
get_property(_is_win32 TARGET test8 PROPERTY WIN32_EXECUTABLE)
if (NOT _is_win32)
message(FATAL_ERROR "test8 is not a WIN32 executable when it should be")
endif()
get_property(_is_bundle TARGET test8 PROPERTY MACOSX_BUNDLE)
if (NOT _is_bundle)
message(FATAL_ERROR "test8 is not an OS/X bundle when it should be")
endif()
get_property(_is_win32 TARGET test9 PROPERTY WIN32_EXECUTABLE)
if (NOT _is_win32)
message(FATAL_ERROR "test9 is not a WIN32 executable when it should be")
endif()
get_property(_is_bundle TARGET test9 PROPERTY MACOSX_BUNDLE)
if (NOT _is_bundle)
message(FATAL_ERROR "test9 is not an OS/X bundle when it should be")
endif()
set(exp_workingdir "${CMAKE_CURRENT_BINARY_DIR}/test1011_dir")
file(MAKE_DIRECTORY "${exp_workingdir}") # cmake does not create that for us, will complain otherwise
ecm_add_tests(
test10.cpp
test11.cpp
LINK_LIBRARIES testhelper
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test1011_dir"
)
get_property(_dummy TARGET test10 PROPERTY TYPE)
get_property(_dummy TARGET test11 PROPERTY TYPE)
get_property(_dummy TEST test10 PROPERTY TIMEOUT)
get_property(_dummy TEST test11 PROPERTY TIMEOUT)
get_property(_working_dir TEST test10 PROPERTY WORKING_DIRECTORY)
assert_vars_setequal(_working_dir exp_workingdir)
get_property(_working_dir TEST test11 PROPERTY WORKING_DIRECTORY)
assert_vars_setequal(_working_dir exp_workingdir)
get_property(_is_win32 TARGET test10 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test10 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test10 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test10 is an OS/X bundle when it should not be")
endif()
get_property(_is_win32 TARGET test11 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test11 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test11 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test11 is an OS/X bundle when it should not be")
endif()
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test1.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test10.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test11.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test2.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test3.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test4.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test5.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test6.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test7.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test8.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test9.txt");
return 0;
}
@@ -0,0 +1,149 @@
cmake_minimum_required(VERSION 3.5)
project(ECMAddTests)
set(ECM_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../modules)
set(CMAKE_MODULE_PATH "${ECM_MODULE_DIR}")
add_library(testhelper STATIC ../testhelper.cpp)
target_include_directories(testhelper PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
# Link to QtCore for WinMain on Windows
include(QtVersionOption)
find_package(Qt${QT_MAJOR_VERSION}Core REQUIRED)
target_link_libraries(testhelper PUBLIC Qt${QT_MAJOR_VERSION}::Core)
enable_testing()
include(ECMAddTests)
include(../../test_helpers.cmake)
# clean up to avoid false-positives from check_files.cmake
file(REMOVE
"${CMAKE_CURRENT_BINARY_DIR}/test1.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test2.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test3.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test4.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test5.txt"
"${CMAKE_CURRENT_BINARY_DIR}/test6.txt"
)
file(REMOVE_RECURSE
"${CMAKE_CURRENT_BINARY_DIR}/test7_dir"
)
ecm_add_test(test1.cpp
LINK_LIBRARIES testhelper
)
# check target exists
get_property(_dummy TARGET test1 PROPERTY TYPE)
# check test exists
get_property(_dummy TEST test1 PROPERTY TIMEOUT)
get_property(_is_win32 TARGET test1 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test1 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test1 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test1 is an OS/X bundle when it should not be")
endif()
ecm_add_test(test2.cpp
LINK_LIBRARIES testhelper
TEST_NAME named_test
)
get_property(_dummy TARGET named_test PROPERTY TYPE)
get_property(_dummy TEST named_test PROPERTY TIMEOUT)
get_property(_is_win32 TARGET named_test PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "named_test is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET named_test PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "named_test is an OS/X bundle when it should not be")
endif()
ecm_add_test(test3.cpp
LINK_LIBRARIES testhelper
NAME_PREFIX prefix_
)
get_property(_dummy TARGET test3 PROPERTY TYPE)
get_property(_dummy TEST prefix_test3 PROPERTY TIMEOUT)
get_property(_is_win32 TARGET test3 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test3 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test3 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test3 is an OS/X bundle when it should not be")
endif()
ecm_add_test(test4.cpp
LINK_LIBRARIES testhelper
GUI
)
get_property(_dummy TARGET test4 PROPERTY TYPE)
get_property(_dummy TEST test4 PROPERTY TIMEOUT)
get_property(_is_win32 TARGET test4 PROPERTY WIN32_EXECUTABLE)
if (NOT _is_win32)
message(FATAL_ERROR "test4 is not a WIN32 executable when it should be")
endif()
get_property(_is_bundle TARGET test4 PROPERTY MACOSX_BUNDLE)
if (NOT _is_bundle)
message(FATAL_ERROR "test4 is not an OS/X bundle when it should be")
endif()
ecm_add_test(test5.cpp
LINK_LIBRARIES testhelper
TEST_NAME combined_test
NAME_PREFIX another_prefix_
GUI
)
get_property(_dummy TARGET combined_test PROPERTY TYPE)
get_property(_dummy TEST another_prefix_combined_test PROPERTY TIMEOUT)
get_property(_is_win32 TARGET combined_test PROPERTY WIN32_EXECUTABLE)
if (NOT _is_win32)
message(FATAL_ERROR "combined_test is not a WIN32 executable when it should be")
endif()
get_property(_is_bundle TARGET combined_test PROPERTY MACOSX_BUNDLE)
if (NOT _is_bundle)
message(FATAL_ERROR "combined_test is not an OS/X bundle when it should be")
endif()
ecm_add_test(test6.cpp test6body.cpp
LINK_LIBRARIES testhelper
TEST_NAME multifile_test
)
get_property(_dummy TARGET multifile_test PROPERTY TYPE)
get_property(_dummy TEST multifile_test PROPERTY TIMEOUT)
get_property(_is_win32 TARGET multifile_test PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "multifile_test is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET multifile_test PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "multifile_test is an OS/X bundle when it should not be")
endif()
set(exp_workingdir "${CMAKE_CURRENT_BINARY_DIR}/test7_dir")
file(MAKE_DIRECTORY "${exp_workingdir}") # cmake does not create that for us, will complain otherwise
ecm_add_test(test7.cpp
LINK_LIBRARIES testhelper
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/test7_dir"
)
get_property(_dummy TARGET test7 PROPERTY TYPE)
get_property(_dummy TEST test7 PROPERTY TIMEOUT)
get_property(_working_dir TEST test7 PROPERTY WORKING_DIRECTORY)
assert_vars_setequal(_working_dir exp_workingdir)
get_property(_is_win32 TARGET test7 PROPERTY WIN32_EXECUTABLE)
if (_is_win32)
message(FATAL_ERROR "test7 is a WIN32 executable when it should not be")
endif()
get_property(_is_bundle TARGET test7 PROPERTY MACOSX_BUNDLE)
if (_is_bundle)
message(FATAL_ERROR "test7 is an OS/X bundle when it should not be")
endif()
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test1.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test2.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test3.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test4.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test5.txt");
return 0;
}
@@ -0,0 +1,8 @@
void test_body();
int main()
{
test_body();
return 0;
}
@@ -0,0 +1,7 @@
#include "testhelper.h"
void test_body()
{
make_test_file("test6.txt");
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
int main()
{
make_test_file("test7.txt");
return 0;
}
@@ -0,0 +1,8 @@
#include "testhelper.h"
#include <fstream>
#include <string>
void make_test_file(const char *filename)
{
std::ofstream(filename) << "test" << std::endl;
}
@@ -0,0 +1 @@
void make_test_file(const char *filename);