test

The shared helpers of the test suites.

Detailed description

Function documentation

removeD3D12Device

test::DeviceRemoval test::removeD3D12Device(QRhi *rhi)

Remove the Direct3D 12 device of rhi on purpose.

Takes the device from QRhiD3D12NativeHandles and passes it to removeD3D12Device(void *). A QRhi on another backend, or a null one, gives a DeviceRemoval that says so.

Returns whether the device was removed, and why not.

removeD3D12Device (2)

test::DeviceRemoval test::removeD3D12Device(void *nativeDevice)

Remove the ID3D12Device at nativeDevice on purpose.

Queries ID3D12Device5 and calls RemoveDevice(). The runtime then signals every fence of the device and every later call on it fails with DXGI_ERROR_DEVICE_REMOVED, as after a GPU timeout, but without a reset of the GPU for the whole machine (§GTR-T1). Needs Windows 10 build 20348 or later; on an older build, another OS or a runtime without ID3D12Device5, nothing happens and why says which.

Returns whether the device was removed, and why not.

Classes

Class What it is
CommsParty —
LoopGapMeter Measures the largest gap between iterations of a thread's event loop, with and without the time the thread waited for a CPU
MessageCapture Record the Qt messages a scope logs, so that a test can assert a diagnostic rather than hope for it (test-system-revamp §TSR-S-7, audit §TSR-Q-4.2)
PerBuild A value for each class, each optional (§BCL-5)
TemporaryTree A temporary folder that a test fills with files by relative path, and that goes away with it (test-system-revamp §TSR-S-7, audit §TSR-Q-4.2)

Namespaces

Namespace What it is
image Comparison of images in tests, and reference images kept as fixtures
scale Timing helpers for the scale tests of the tree
source Scans of the source tree that tests make
In this section