Skip to content

Refactor the test suite SDK into a new library target

Amy spark requested to merge lsegovia/krita:work/amyspark/kritabench into master

👋

Yet more cleanup. In this case, I propose a refactor that simplifies greatly the setup of our test suite, through a new linkable target kritatestsdk.

Once linking to kritatestsdk, the system-wide definitions for looking up resources, data, and output directories will be integrated into the executable harness. To finish it off, when declaring the executable to be a test via kis_add_test or kis_add_benchmark, the customized definitions will be created and inserted through target_compile_definitions.

There are some cleanup preliminaries I've ordered towards the beginning of this branch. Towards the end, you'll find some extra refactors made possible by this change, in particular unbreaking the Layer Docker, and cleaning up duplicated translation units in the PSD and LUT docker. (I believe these were left over from when they needed to be compiled twice due to the MODULE linkage issue. See !1500 (merged).)

Test Plan

Build Krita and run its tests.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports