-
Notifications
You must be signed in to change notification settings - Fork 314
Cleanup test framework usage #1835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup test framework usage #1835
Conversation
|
CI Vulkan-Loader build queued with queue ID 602528. |
|
CI Vulkan-Loader build queued with queue ID 602545. |
d2418e0 to
dde3b06
Compare
|
CI Vulkan-Loader build queued with queue ID 602546. |
|
CI Vulkan-Loader build # 3339 running. |
|
CI Vulkan-Loader build queued with queue ID 602584. |
dde3b06 to
4bd6b5b
Compare
|
CI Vulkan-Loader build queued with queue ID 602585. |
spencer-lunarg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see Charles is going for another year of being the git blame for the loader, congratz
|
CI Vulkan-Loader build # 3341 running. |
4bd6b5b to
a11e20a
Compare
|
CI Vulkan-Loader build queued with queue ID 602621. |
|
CI Vulkan-Loader build # 3342 running. |
|
CI Vulkan-Loader build queued with queue ID 602640. |
|
CI Vulkan-Loader build # 3343 running. |
a11e20a to
7a2ebad
Compare
|
CI Vulkan-Loader build queued with queue ID 602676. |
|
CI Vulkan-Loader build # 3344 running. |
Better to use the TestLayerDetails struct directly when a fake layer is needed.
They contain the same logic, just need to specialize based on the types used.
7a2ebad to
85c7b42
Compare
|
CI Vulkan-Loader build queued with queue ID 602697. |
|
CI Vulkan-Loader build # 3345 running. |
|
CI Vulkan-Loader build queued with queue ID 602715. |
|
CI Vulkan-Loader build # 3346 running. |
|
CI Vulkan-Loader build # 3346 failed. |
85c7b42 to
318c8e7
Compare
|
CI Vulkan-Loader build queued with queue ID 602739. |
|
CI Vulkan-Loader build queued with queue ID 602756. |
|
CI Vulkan-Loader build # 3348 running. |
|
CI Vulkan-Loader build # 3348 failed. |
318c8e7 to
211fdfc
Compare
|
CI Vulkan-Loader build queued with queue ID 602793. |
|
CI Vulkan-Loader build queued with queue ID 602810. |
|
CI Vulkan-Loader build # 3350 running. |
Reformulate how tests create test ICD's to simplify and reduce clutter. Moves ManifestICD out of the TestCreateDetails and put it as a separate argument to make it easier to configure the Manifest & the configuration of the binary.
Move the ManifestLayer out of the TestLayerDetails, as well as drop TestLayerDetails in favor of BinaryCreateArgs, since its the same as for test ICD creation. This makes configuring test layer creation simpler since everything isn't bound to one type. Also dropped the json name from most layers in the tests because that isn't an active part of the test. Simplifies test creation to not need to specify a json file name when it doesn't matter for the purpose of the test. Tests which do care (eg, ones which inspect the log) still can set a name and it is respected. Otherwise, layers will use "test_layer_x.json" as the default name, where x is a number used to distinguish created layers.
disable_name_increment was used to stop the test framework from adding _X to the manifest file name, so tests can test against the exact file name. Since tests have to specify a name, it is possible to infer the intent by just checking to see if json_name has been set. If it hasn't, "test_icd_x.json" is used, where x is used to distinguish between created ICD's. This makes writing tests easier and less error prone.
Remove set_is_dir(false) in many places since it is redundant as false is the default. Remove set_is_dir(true) in many places where it does nothing, eg the discovery type isnt' env-var or add-env-var.
211fdfc to
311563a
Compare
|
CI Vulkan-Loader build queued with queue ID 602836. |
|
CI Vulkan-Loader build # 3351 running. |
|
CI Vulkan-Loader build queued with queue ID 602854. |
|
CI Vulkan-Loader build # 3352 running. |
|
CI Vulkan-Loader build # 3352 passed. |
Move the ManifestLayer & ManifestICD struct members out of TestLayerDetails/TestICDDetails as well as consolidate TestLayerDetails & TestICDDetails into one struct since they shared the same members.
Rework pretty much every test since each call to add_icd/add_layer had the parameters change with the above work. Makes most tests simpler since add_icd can take the binary as the first argument, defaulting the ManifestOptions & ManifestICD parameters.