|
13 | 13 | // See the License for the specific language governing permissions and
|
14 | 14 | // limitations under the License.
|
15 | 15 | //
|
16 |
| -#include "harness/compat.h" |
17 |
| -#include <stdio.h> |
18 |
| -#include <stdlib.h> |
19 | 16 |
|
20 |
| -#include <string.h> |
21 |
| -#include "procs.h" |
22 | 17 | #include "harness/testHarness.h"
|
23 | 18 |
|
24 |
| -#if !defined(_WIN32) |
25 |
| -#include <unistd.h> |
26 |
| -#endif |
27 |
| - |
28 |
| -// FIXME: To use certain functions in harness/imageHelpers.h |
29 |
| -// (for example, generate_random_image_data()), the tests are required to |
30 |
| -// declare the following variables (<rdar://problem/11111245>): |
31 |
| - |
32 |
| -test_definition test_list[] = { |
33 |
| - ADD_TEST(get_platform_info), |
34 |
| - ADD_TEST_VERSION(get_sampler_info, Version(2, 0)), |
35 |
| - ADD_TEST(get_sampler_info_compatibility), |
36 |
| - ADD_TEST_VERSION(get_command_queue_info, Version(2, 0)), |
37 |
| - ADD_TEST(get_command_queue_info_compatibility), |
38 |
| - ADD_TEST(get_context_info), |
39 |
| - ADD_TEST(get_device_info), |
40 |
| - ADD_TEST(enqueue_task), |
41 |
| - ADD_TEST(binary_get), |
42 |
| - ADD_TEST(binary_create), |
43 |
| - ADD_TEST(kernel_required_group_size), |
44 |
| - |
45 |
| - ADD_TEST(release_kernel_order), |
46 |
| - ADD_TEST(release_during_execute), |
47 |
| - |
48 |
| - ADD_TEST(load_single_kernel), |
49 |
| - ADD_TEST(load_two_kernels), |
50 |
| - ADD_TEST(load_two_kernels_in_one), |
51 |
| - ADD_TEST(load_two_kernels_manually), |
52 |
| - ADD_TEST(get_program_info_kernel_names), |
53 |
| - ADD_TEST(get_kernel_arg_info), |
54 |
| - ADD_TEST(create_kernels_in_program), |
55 |
| - ADD_TEST(get_kernel_info), |
56 |
| - ADD_TEST(kernel_private_memory_size), |
57 |
| - ADD_TEST(execute_kernel_local_sizes), |
58 |
| - ADD_TEST(set_kernel_arg_by_index), |
59 |
| - ADD_TEST(set_kernel_arg_constant), |
60 |
| - ADD_TEST(set_kernel_arg_struct_array), |
61 |
| - ADD_TEST(kernel_global_constant), |
62 |
| - ADD_TEST(kernel_attributes), |
63 |
| - |
64 |
| - ADD_TEST(min_max_thread_dimensions), |
65 |
| - ADD_TEST(min_max_work_items_sizes), |
66 |
| - ADD_TEST(min_max_work_group_size), |
67 |
| - ADD_TEST(min_max_read_image_args), |
68 |
| - ADD_TEST(min_max_write_image_args), |
69 |
| - ADD_TEST(min_max_mem_alloc_size), |
70 |
| - ADD_TEST(min_max_image_2d_width), |
71 |
| - ADD_TEST(min_max_image_2d_height), |
72 |
| - ADD_TEST(min_max_image_3d_width), |
73 |
| - ADD_TEST(min_max_image_3d_height), |
74 |
| - ADD_TEST(min_max_image_3d_depth), |
75 |
| - ADD_TEST(min_max_image_array_size), |
76 |
| - ADD_TEST(min_max_image_buffer_size), |
77 |
| - ADD_TEST(min_max_parameter_size), |
78 |
| - ADD_TEST(min_max_samplers), |
79 |
| - ADD_TEST(min_max_constant_buffer_size), |
80 |
| - ADD_TEST(min_max_constant_args), |
81 |
| - ADD_TEST(min_max_compute_units), |
82 |
| - ADD_TEST(min_max_address_bits), |
83 |
| - ADD_TEST(min_max_single_fp_config), |
84 |
| - ADD_TEST(min_max_double_fp_config), |
85 |
| - ADD_TEST(min_max_local_mem_size), |
86 |
| - ADD_TEST(min_max_kernel_preferred_work_group_size_multiple), |
87 |
| - ADD_TEST(min_max_execution_capabilities), |
88 |
| - ADD_TEST(min_max_queue_properties), |
89 |
| - ADD_TEST(min_max_device_version), |
90 |
| - ADD_TEST(min_max_language_version), |
91 |
| - |
92 |
| - ADD_TEST(kernel_arg_changes), |
93 |
| - ADD_TEST(kernel_arg_multi_setup_random), |
94 |
| - |
95 |
| - ADD_TEST(native_kernel), |
96 |
| - |
97 |
| - ADD_TEST(create_context_from_type), |
98 |
| - ADD_TEST(create_context_from_type_device_type_all), |
99 |
| - ADD_TEST(create_context_from_type_device_type_default), |
100 |
| - |
101 |
| - ADD_TEST(platform_extensions), |
102 |
| - ADD_TEST(get_platform_ids), |
103 |
| - ADD_TEST(bool_type), |
104 |
| - |
105 |
| - ADD_TEST(repeated_setup_cleanup), |
106 |
| - |
107 |
| - ADD_TEST(retain_queue_single), |
108 |
| - ADD_TEST(retain_queue_multiple), |
109 |
| - ADD_TEST(retain_mem_object_single), |
110 |
| - ADD_TEST(retain_mem_object_multiple), |
111 |
| - ADD_TEST(retain_mem_object_set_kernel_arg), |
112 |
| - ADD_TEST(min_data_type_align_size_alignment), |
113 |
| - |
114 |
| - ADD_TEST_VERSION(context_destructor_callback, Version(3, 0)), |
115 |
| - ADD_TEST(mem_object_destructor_callback), |
116 |
| - ADD_TEST(null_buffer_arg), |
117 |
| - ADD_TEST(get_buffer_info), |
118 |
| - ADD_TEST(get_image2d_info), |
119 |
| - ADD_TEST(get_image3d_info), |
120 |
| - ADD_TEST(get_image1d_info), |
121 |
| - ADD_TEST(get_image1d_array_info), |
122 |
| - ADD_TEST(get_image2d_array_info), |
123 |
| - ADD_TEST(queue_flush_on_release), |
124 |
| - ADD_TEST(queue_hint), |
125 |
| - ADD_TEST(queue_properties), |
126 |
| - ADD_TEST_VERSION(sub_group_dispatch, Version(2, 1)), |
127 |
| - ADD_TEST_VERSION(clone_kernel, Version(2, 1)), |
128 |
| - ADD_TEST_VERSION(zero_sized_enqueue, Version(2, 1)), |
129 |
| - |
130 |
| - ADD_TEST_VERSION(buffer_properties_queries, Version(3, 0)), |
131 |
| - ADD_TEST_VERSION(image_properties_queries, Version(3, 0)), |
132 |
| - ADD_TEST_VERSION(queue_properties_queries, Version(3, 0)), |
133 |
| - ADD_TEST_VERSION(pipe_properties_queries, Version(3, 0)), |
134 |
| - |
135 |
| - ADD_TEST_VERSION(consistency_svm, Version(3, 0)), |
136 |
| - ADD_TEST_VERSION(consistency_memory_model, Version(3, 0)), |
137 |
| - ADD_TEST_VERSION(consistency_device_enqueue, Version(3, 0)), |
138 |
| - ADD_TEST_VERSION(consistency_pipes, Version(3, 0)), |
139 |
| - ADD_TEST_VERSION(consistency_progvar, Version(3, 0)), |
140 |
| - ADD_TEST_VERSION(consistency_non_uniform_work_group, Version(3, 0)), |
141 |
| - ADD_TEST_VERSION(consistency_read_write_images, Version(3, 0)), |
142 |
| - ADD_TEST_VERSION(consistency_2d_image_from_buffer, Version(3, 0)), |
143 |
| - ADD_TEST_VERSION(consistency_depth_images, Version(3, 0)), |
144 |
| - ADD_TEST_VERSION(consistency_device_and_host_timer, Version(3, 0)), |
145 |
| - ADD_TEST_VERSION(consistency_il_programs, Version(3, 0)), |
146 |
| - ADD_TEST_VERSION(consistency_subgroups, Version(3, 0)), |
147 |
| - ADD_TEST_VERSION(consistency_prog_ctor_dtor, Version(3, 0)), |
148 |
| - ADD_TEST_VERSION(consistency_3d_image_writes, Version(3, 0)), |
149 |
| - ADD_TEST(consistency_requirements_fp64), |
150 |
| - ADD_TEST(consistency_requirements_fp16), |
151 |
| - |
152 |
| - ADD_TEST(min_image_formats), |
153 |
| - ADD_TEST(set_command_queue_property), |
154 |
| - |
155 |
| - ADD_TEST(negative_get_platform_info), |
156 |
| - ADD_TEST(negative_get_platform_ids), |
157 |
| - |
158 |
| - ADD_TEST(work_group_suggested_local_size_1D), |
159 |
| - ADD_TEST(work_group_suggested_local_size_2D), |
160 |
| - ADD_TEST(work_group_suggested_local_size_3D), |
161 |
| - |
162 |
| - ADD_TEST(negative_create_command_queue), |
163 |
| - ADD_TEST_VERSION(negative_create_command_queue_with_properties, |
164 |
| - Version(2, 0)), |
165 |
| - ADD_TEST(negative_create_command_queue_with_properties_khr), |
166 |
| - ADD_TEST(kernel_local_memory_size), |
167 |
| - |
168 |
| - ADD_TEST_VERSION(set_default_device_command_queue, Version(2, 1)), |
169 |
| -}; |
170 |
| - |
171 |
| -const int test_num = ARRAY_SIZE(test_list); |
172 |
| - |
173 | 19 | int main(int argc, const char *argv[])
|
174 | 20 | {
|
175 |
| - return runTestHarness(argc, argv, test_num, test_list, false, 0); |
| 21 | + return runTestHarness(argc, argv, test_registry::getInstance().num_tests(), |
| 22 | + test_registry::getInstance().definitions(), false, 0); |
176 | 23 | }
|
0 commit comments