Add tests framework for verifying calls to native COM servers


Testing ActiveQt behavior against native COM servers is currently a hard
and manual process because we don't have a customizable COM server to
test against.

This patch introduces a test COM server that can be extended to cover
multiple test scenarios where we want to verify that the native COM
server (not Active Qt) is called with the expected inputs and outputs.

We use registry free COM to activate the server, to make it suitable
for auto-test where we don't necessarily have admin access to register
COM dlls.

The idea of the test framework is that any calls through QAxObject
results in a COM call to the test server. The arguments passed by Active
Qt to the test server is then echoed back to test observer that receives
the function arguments.

In this first test, the test server has a single function that takes a
VARIANT argument. This way we can add tests that verifies that Active Qt
converts QVariant to VARIANT as we expect, while testing the entire
pipeline. This can potentially be used in addition to, or as a
replacement of existing QVariant to VARIANT conversion tests.

To enable automatically regenerating the QAxObject wrapper when the type
library changes, the qt6_target_typelibs function is updated to declare
its input dependency to CMake.

Change-Id: I503a9f61cf44294d1083761cab6a7be3ce1b278f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
commit377c95c4a09f7c363c5c609c2bf7907373c39925
parent2013424a3eaff829891eb6c7bdafb3b971fb6cd0
authorJøger Hansegård <joger.hansegard@qt.io>
committerJøger Hansegård <joger.hansegard@qt.io>
commit timeFri, 17 May 2024 13:46:39 +0200