Skip to content

Enable osign gtest suite under CTest - #133

Closed
Hathor875 wants to merge 1 commit into
Euro-Office:mainfrom
Hathor875:feat/osign-cmake-ctest
Closed

Enable osign gtest suite under CTest#133
Hathor875 wants to merge 1 commit into
Euro-Office:mainfrom
Hathor875:feat/osign-cmake-ctest

Conversation

@Hathor875

@Hathor875 Hathor875 commented Aug 23, 2026

Copy link
Copy Markdown

Superseded by #134 (same branch and commit, corrected description). Sorry for the noise.

Port the osign library from qmake to CMake and register its GoogleTest
suite with CTest. This was the last un-migrated gtest suite in the list
tracked by issue Euro-Office#93, blocked only by the missing osign build target.

The suite needs no fixtures — it generates its own passwords and
certificates at run time — so the target needs neither staged data nor a
custom WORKING_DIRECTORY.

Notes on the translation of osign.pro:

- common_openssl.cpp is compiled into the library. osign.pro pulls it in
  through "CONFIG += open_ssl_common" (openssl.pri) and certificate.cpp
  calls NSOpenSSL::PBKDF2 and AES_*_desktop_GCM, so the test executable
  does not link without it.
- Base64.cpp and File.cpp are deliberately not compiled in. The .pro
  compiled them directly because qmake did not link kernel; the CMake
  target links kernel, which already provides NSBase64 and NSFile.
- KERNEL_USE_DYNAMIC_LIBRARY_BUILDING is not carried over. In the .pro it
  only served to export those two files from osign; the target now wants
  KERNEL_DECL = Q_DECL_IMPORT.
- src/Certificate_openssl.h and the support_oform block are dropped —
  neither header exists under osign/lib/src and no source includes them.
- The core_windows link list is ported verbatim but is untested here, as
  the port was developed and verified on Linux.

Like ooxmlsignature, the library is not added to the default build; it is
reached only through the test's guarded add_subdirectory, so nothing
changes when EO_BUILD_TESTS is OFF.

Verified locally: osign_test builds from a clean target directory and
reports 6/6 passing; the seven other built CTest suites still pass
alongside it.

Assisted-by: Claude Code:claude-opus-5
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Krzysztof Cieślik <132496025+Hathor875@users.noreply.github.com>
@Hathor875
Hathor875 marked this pull request as ready for review August 23, 2026 00:52
@Hathor875
Hathor875 requested a review from a team as a code owner August 23, 2026 00:52
@Hathor875
Hathor875 requested review from DmySyz and rikled and removed request for a team August 23, 2026 00:52
@Hathor875 Hathor875 closed this Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant