Migrate events suite to the new test registration framework (#2324)

Contributes to #2181.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
Ahmed Hesham
2025-03-11 21:57:59 +00:00
committed by GitHub
parent bb331c2c92
commit c4fa48db05
9 changed files with 95 additions and 319 deletions

View File

@@ -13,57 +13,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include "harness/compat.h"
#include <stdio.h>
#include <string.h>
#include "procs.h"
#include "harness/testHarness.h"
#if !defined(_WIN32)
#include <unistd.h>
#endif
test_definition test_list[] = {
ADD_TEST(event_get_execute_status),
ADD_TEST(event_get_write_array_status),
ADD_TEST(event_get_read_array_status),
ADD_TEST(event_get_info),
ADD_TEST(event_wait_for_execute),
ADD_TEST(event_wait_for_array),
ADD_TEST(event_flush),
ADD_TEST(event_finish_execute),
ADD_TEST(event_finish_array),
ADD_TEST(event_release_before_done),
ADD_TEST(event_enqueue_marker),
#ifdef CL_VERSION_1_2
ADD_TEST(event_enqueue_marker_with_event_list),
ADD_TEST(event_enqueue_barrier_with_event_list),
#endif
ADD_TEST(out_of_order_event_waitlist_single_queue),
ADD_TEST(out_of_order_event_waitlist_multi_queue),
ADD_TEST(out_of_order_event_waitlist_multi_queue_multi_device),
ADD_TEST(out_of_order_event_enqueue_wait_for_events_single_queue),
ADD_TEST(out_of_order_event_enqueue_wait_for_events_multi_queue),
ADD_TEST(
out_of_order_event_enqueue_wait_for_events_multi_queue_multi_device),
ADD_TEST(out_of_order_event_enqueue_marker_single_queue),
ADD_TEST(out_of_order_event_enqueue_marker_multi_queue),
ADD_TEST(out_of_order_event_enqueue_marker_multi_queue_multi_device),
ADD_TEST(out_of_order_event_enqueue_barrier_single_queue),
ADD_TEST(waitlists),
ADD_TEST(userevents),
ADD_TEST(callbacks),
ADD_TEST(callbacks_simultaneous),
ADD_TEST(userevents_multithreaded),
ADD_TEST(callback_on_error_simple),
ADD_TEST(callback_on_error_enqueue_command)
};
const int test_num = ARRAY_SIZE(test_list);
int main(int argc, const char *argv[])
{
return runTestHarness(argc, argv, test_num, test_list, false, 0);
return runTestHarness(argc, argv, test_registry::getInstance().num_tests(),
test_registry::getInstance().definitions(), false, 0);
}