1 //
2 // Copyright (c) 2017 The Khronos Group Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 #include "harness/compat.h"
17
18 #include <stdio.h>
19 #include <string.h>
20 #include "procs.h"
21 #include "harness/testHarness.h"
22 #if !defined(_WIN32)
23 #include <unistd.h>
24 #endif
25
26 test_definition test_list[] = {
27 ADD_TEST(event_get_execute_status),
28 ADD_TEST(event_get_write_array_status),
29 ADD_TEST(event_get_read_array_status),
30 ADD_TEST(event_get_info),
31 ADD_TEST(event_wait_for_execute),
32 ADD_TEST(event_wait_for_array),
33 ADD_TEST(event_flush),
34 ADD_TEST(event_finish_execute),
35 ADD_TEST(event_finish_array),
36 ADD_TEST(event_release_before_done),
37 ADD_TEST(event_enqueue_marker),
38 #ifdef CL_VERSION_1_2
39 ADD_TEST(event_enqueue_marker_with_event_list),
40 ADD_TEST(event_enqueue_barrier_with_event_list),
41 #endif
42
43 ADD_TEST(out_of_order_event_waitlist_single_queue),
44 ADD_TEST(out_of_order_event_waitlist_multi_queue),
45 ADD_TEST(out_of_order_event_waitlist_multi_queue_multi_device),
46 ADD_TEST(out_of_order_event_enqueue_wait_for_events_single_queue),
47 ADD_TEST(out_of_order_event_enqueue_wait_for_events_multi_queue),
48 ADD_TEST(
49 out_of_order_event_enqueue_wait_for_events_multi_queue_multi_device),
50 ADD_TEST(out_of_order_event_enqueue_marker_single_queue),
51 ADD_TEST(out_of_order_event_enqueue_marker_multi_queue),
52 ADD_TEST(out_of_order_event_enqueue_marker_multi_queue_multi_device),
53 ADD_TEST(out_of_order_event_enqueue_barrier_single_queue),
54
55 ADD_TEST(waitlists),
56 ADD_TEST(userevents),
57 ADD_TEST(callbacks),
58 ADD_TEST(callbacks_simultaneous),
59 ADD_TEST(userevents_multithreaded),
60 };
61
62 const int test_num = ARRAY_SIZE(test_list);
63
main(int argc,const char * argv[])64 int main(int argc, const char *argv[])
65 {
66 return runTestHarness(argc, argv, test_num, test_list, false, 0);
67 }
68