1 // Copyright (c) 2022 The Khronos Group Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 #include "procs.h"
16 #include "harness/testHarness.h"
17
18 test_definition test_list[] = {
19 ADD_TEST(single_ndrange),
20 ADD_TEST(interleaved_enqueue),
21 ADD_TEST(mixed_commands),
22 ADD_TEST(explicit_flush),
23 ADD_TEST(out_of_order),
24 ADD_TEST(simultaneous_out_of_order),
25 ADD_TEST(info_queues),
26 ADD_TEST(info_ref_count),
27 ADD_TEST(info_state),
28 ADD_TEST(info_prop_array),
29 ADD_TEST(info_context),
30 ADD_TEST(basic_profiling),
31 ADD_TEST(simultaneous_profiling),
32 ADD_TEST(regular_wait_for_command_buffer),
33 ADD_TEST(command_buffer_wait_for_command_buffer),
34 ADD_TEST(command_buffer_wait_for_sec_command_buffer),
35 ADD_TEST(return_event_callback),
36 ADD_TEST(clwaitforevents_single),
37 ADD_TEST(clwaitforevents),
38 ADD_TEST(command_buffer_wait_for_regular),
39 ADD_TEST(wait_for_sec_queue_event),
40 ADD_TEST(user_event_wait),
41 ADD_TEST(user_events_wait),
42 ADD_TEST(user_event_callback),
43 ADD_TEST(queue_substitution),
44 ADD_TEST(properties_queue_substitution),
45 ADD_TEST(simultaneous_queue_substitution),
46 ADD_TEST(fill_image),
47 ADD_TEST(fill_buffer),
48 ADD_TEST(fill_svm_buffer),
49 ADD_TEST(copy_image),
50 ADD_TEST(copy_buffer),
51 ADD_TEST(copy_svm_buffer),
52 ADD_TEST(copy_buffer_to_image),
53 ADD_TEST(copy_image_to_buffer),
54 ADD_TEST(copy_buffer_rect),
55 ADD_TEST(barrier_wait_list),
56 ADD_TEST(basic_printf),
57 ADD_TEST(simultaneous_printf),
58 ADD_TEST(basic_set_kernel_arg),
59 ADD_TEST(pending_set_kernel_arg),
60 ADD_TEST(event_info_command_type),
61 ADD_TEST(event_info_command_queue),
62 ADD_TEST(event_info_execution_status),
63 ADD_TEST(event_info_context),
64 ADD_TEST(event_info_reference_count),
65 ADD_TEST(finalize_invalid),
66 ADD_TEST(finalize_empty)
67 };
68
main(int argc,const char * argv[])69 int main(int argc, const char *argv[])
70 {
71 // A device may report the required properties of a queue that
72 // is compatible with command-buffers via the query
73 // CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR. We account
74 // for this in the tests themselves, rather than here, where we have a
75 // device to query.
76 const cl_command_queue_properties queue_properties = 0;
77 return runTestHarnessWithCheck(argc, argv, ARRAY_SIZE(test_list), test_list,
78 false, queue_properties, nullptr);
79 }
80