Commit Graph

36 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen c2473fb873 tests: Improve log quality.
Set test name equal to the test that is actually running, not a global
"d3d12" which isn't very useful for a case with multiple files since
line number alone isn't enough to know where to look.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-08-26 14:05:23 +02:00
Hans-Kristian Arntzen 4a6fba9f56 tests: Make some statics in headers extern.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-08-26 14:05:23 +02:00
Hans-Kristian Arntzen 9d5cf16fc3 tests: Move common test code to its own file.
Some ifdef jank required since the various headers declare the main function.
Some additional jank with INITGUID, otherwise we get multiple
declaration errors.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2021-08-26 14:05:23 +02:00
Georg Lehmann 2c3988e6df tests: Add env var to exclude tests.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
2021-04-15 15:10:25 +02:00
Joshua Ashton 43e7316591 tests: Default VKD3D_TEST_DEBUG to 1
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-03-16 21:43:01 +01:00
Joshua Ashton 9b2841b50f tests: Fix -Wsign-compare warnings
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2021-02-15 17:54:54 +01:00
Hans-Kristian Arntzen f991dea51a tests: Report successful TODOs separately from failures.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-30 08:16:16 +01:00
Hans-Kristian Arntzen 01a7ec6310 tests: Use fflush()
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen 50bd2db618 vkd3d: Fix use of non-standard vararg macros.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-01 19:15:39 +02:00
Józef Kucia b71120d78d tests: Introduce VKD3D_TEST_FILTER.
Useful for running a subset of tests.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 09:37:57 +02:00
Józef Kucia 6f960f2096 tests: Add VKD3D_TEST_BUG env var to control bug_if() conditions.
Run tests with VKD3D_TEST_BUG=0 to disable bug_if() conditions.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-09 08:21:08 -05:00
Józef Kucia 6c141d7457 tests: Introduce assert_that().
This allows us to put a bug_if() or todo_if() in the front of functions
that check other conditions not directly related to the actual test.

assert_that() is similar to ok(). The main difference is that it ignores
bug_if() and todo_if().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-11 19:17:29 +01:00
Józef Kucia af50b9d2a0 tests: Mark driver-specific test failures as bugs.
Allows running all tests cleanly on Intel and Nvidia.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 19:46:31 +01:00
Józef Kucia d0f6d8131a tests: Introduce vkd3d_test_set_context().
Useful for table-based tests.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-12 17:08:47 +01:00
Józef Kucia 8553696c2d tests: Add more flexible todo() implementation.
Based on wine/test.h.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:22:44 +01:00
Józef Kucia 8995c681d5 tests: Fix unsupported formats tests on WARP.
A recent version of WARP supports B8G8R8A8 UAVs even on
D3D_FEATURE_LEVEL_11_0.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-01 18:36:40 -07:00
Józef Kucia 4ee7b3428d tests: Fix clang warning.
include/private/vkd3d_test.h:276:22: warning: format string is not a string literal (potentially insecure)
      [-Wformat-security]
    vkd3d_test_debug(name);

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-18 16:21:38 +01:00
Józef Kucia a285b4c842 tests: Explicitly detect if tests are run under Wine.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 13:40:25 +01:00
Józef Kucia 3956eaf6d0 tests: Detect test platform dynamically.
In order to run cross-compiled tests under Wine.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 13:40:22 +01:00
Józef Kucia d100804e91 tests: Make sure that config.h is included before other headers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-14 13:13:03 +01:00
Józef Kucia 84889646f6 Update license to LGPL v2.1. 2017-06-16 22:11:21 +02:00
Józef Kucia 2d0c3c871a tests: Introduce debug levels.
The VKD3D_TEST_DEBUG environment variable can be now set to 1 or 2.
VKD3D_TEST_DEBUG=1 is useful for examining Vulkan validation layers
output.
2016-11-09 15:03:46 +01:00
Józef Kucia 3c66c74167 tests: Pass command line arguments to vkd3d_test_main(). 2016-11-09 15:03:46 +01:00
Józef Kucia 2eed0e0ed3 tests: Write test name to debug output.
This is useful when inspecting the output of D3D12 debug layer.
2016-11-09 15:03:46 +01:00
Józef Kucia 81164d43f7 tests: Use stdbool. 2016-10-24 13:20:09 +02:00
Józef Kucia b4d22aa4e4 include: Fix indentation in vkd3d_test header file. 2016-10-17 14:24:22 +02:00
Józef Kucia 85d498c94b include: Get rid of useless function prototypes in vkd3d_test header file. 2016-10-17 14:24:22 +02:00
Józef Kucia e84ca0af5d tests: Use InterlockedIncrement() for test counters.
This should be useful for multithreaded tests.
2016-10-10 11:22:50 +02:00
Józef Kucia 5f3d5a1263 tests: Include vkd3d_common.h in vkd3d_test.h. 2016-10-10 11:22:50 +02:00
Józef Kucia eb05a388e1 include: Avoid using variable names starting with "__".
Names that begin with "__" are reserved.
2016-10-10 11:22:50 +02:00
Józef Kucia 6330c9f46a tests: Properly print 64-bit unsigned integers.
Use PRIu64 since we use C99.
2016-10-10 11:22:50 +02:00
Henri Verbeet cd37442fd0 tests: ...but keep regular builds working. 2016-09-30 10:00:11 +02:00
Henri Verbeet dc7504c7fc build: Unicode crossbuilds. 2016-09-30 09:41:12 +02:00
Józef Kucia bce85d84ed include: Make test output less verbose. 2016-09-28 09:42:49 +02:00
Józef Kucia 3a5deb7286 include: Add support for marking tests as todo. 2016-09-28 09:42:49 +02:00
Józef Kucia 978584a238 tests: Add test for D3D12CreateDevice(). 2016-09-21 12:57:24 +02:00