Ejemplo n.º 1
0
   int main(int argc, char* argv[])
#endif
{
    UT_os_setup(UT_OS_LOG_FILENAME);

    /* UT_OS_LOG_OFF, UT_OS_LOG_MINIMAL, UT_OS_LOG_MODERATE, UT_OS_LOG_EVERYTHING */
    UT_os_set_log_verbose(UT_OS_LOG_EVERYTHING);

    UT_OS_LOG_MACRO("OSAL Unit Test Output File for oscore APIs\n")

    UT_os_apiinit_test();

    UT_OS_LOG_MACRO("\n============================================\n")
    UT_os_printf_test();
    UT_os_printfenable_test();
    UT_os_printfdisable_test();
    UT_OS_LOG_MACRO("============================================\n")

    UT_os_bin_sem_create_test();
    UT_os_bin_sem_delete_test();
    UT_os_bin_sem_flush_test();
    UT_os_bin_sem_give_test();
    UT_os_bin_sem_take_test();
    UT_os_bin_sem_timed_wait_test();
    UT_os_bin_sem_get_id_by_name_test();
    UT_os_bin_sem_get_info_test();

    UT_os_count_sem_create_test();
    UT_os_count_sem_delete_test();
    UT_os_count_sem_give_test();
    UT_os_count_sem_take_test();
    UT_os_count_sem_timed_wait_test();
    UT_os_count_sem_get_id_by_name_test();
    UT_os_count_sem_get_info_test();

    UT_os_mut_sem_create_test();
    UT_os_mut_sem_delete_test();
    UT_os_mut_sem_give_test();
    UT_os_mut_sem_take_test();
    UT_os_mut_sem_get_id_by_name_test();
    UT_os_mut_sem_get_info_test();

    UT_os_queue_create_test();
    UT_os_queue_delete_test();
    UT_os_queue_put_test();
    UT_os_queue_get_test();
    UT_os_queue_get_id_by_name_test();
    UT_os_queue_get_info_test();

    UT_os_init_task_misc();

    UT_os_init_task_create_test();
    UT_os_task_create_test();

    UT_os_init_task_delete_test();
    UT_os_task_delete_test();

    UT_os_setup_install_delete_handler_test();
    UT_os_task_install_delete_handler_test();

    UT_os_init_task_exit_test();
    UT_os_task_exit_test();

    UT_os_init_task_delay_test();
    UT_os_task_delay_test();

    UT_os_init_task_set_priority_test();
    UT_os_task_set_priority_test();

    UT_os_init_task_register_test();
    UT_os_task_register_test();

    UT_os_init_task_get_id_test();
    UT_OS_LOG_MACRO("\n============================================\n")
    UT_os_task_get_id_test();
    UT_OS_LOG_MACRO("============================================\n")

    UT_os_init_task_get_id_by_name_test();
    UT_os_task_get_id_by_name_test();

    UT_os_init_task_get_info_test();
    UT_os_task_get_info_test();

    UT_os_geterrorname_test();

    UT_os_tick2micros_test();
    UT_os_milli2ticks_test();

    UT_OS_LOG_MACRO("\n============================================")
    UT_os_getlocaltime_test();
    UT_OS_LOG_MACRO("============================================\n")
    UT_os_setlocaltime_test();

    UT_os_teardown("ut_oscore");

    return (0);
}
Ejemplo n.º 2
0
void UT_os_core_tests()
{
    UT_OS_LOG_MACRO("\n============================================\n")
    UT_os_printf_test();
    UT_os_printfenable_test();
    UT_os_printfdisable_test();
    UT_OS_LOG_MACRO("============================================\n")

    UT_os_bin_sem_create_test();
    UT_os_bin_sem_delete_test();
    UT_os_bin_sem_flush_test();
    UT_os_bin_sem_give_test();
    UT_os_bin_sem_take_test();
    UT_os_bin_sem_timed_wait_test();
    UT_os_bin_sem_get_id_by_name_test();
    UT_os_bin_sem_get_info_test();

    UT_os_count_sem_create_test();
    UT_os_count_sem_delete_test();
    UT_os_count_sem_give_test();
    UT_os_count_sem_take_test();
    UT_os_count_sem_timed_wait_test();
    UT_os_count_sem_get_id_by_name_test();
    UT_os_count_sem_get_info_test();

    UT_os_mut_sem_create_test();
    UT_os_mut_sem_delete_test();
    UT_os_mut_sem_give_test();
    UT_os_mut_sem_take_test();
    UT_os_mut_sem_get_id_by_name_test();
    UT_os_mut_sem_get_info_test();

    UT_os_queue_create_test();
    UT_os_queue_delete_test();
    UT_os_queue_put_test();
    UT_os_queue_get_test();
    UT_os_queue_get_id_by_name_test();
    UT_os_queue_get_info_test();

    UT_os_init_task_misc();

    UT_os_init_task_create_test();
    UT_os_task_create_test();

    UT_os_init_task_delete_test();
    UT_os_task_delete_test();

    UT_os_setup_install_delete_handler_test();
    UT_os_task_install_delete_handler_test();

    UT_os_init_task_exit_test();
    UT_os_task_exit_test();

    UT_os_init_task_delay_test();
    UT_os_task_delay_test();

    UT_os_init_task_set_priority_test();
    UT_os_task_set_priority_test();

    UT_os_init_task_register_test();
    UT_os_task_register_test();

    UT_os_init_task_get_id_test();
    UT_OS_LOG_MACRO("\n============================================\n")
    UT_os_task_get_id_test();
    UT_OS_LOG_MACRO("============================================\n")

    UT_os_init_task_get_id_by_name_test();
    UT_os_task_get_id_by_name_test();

    UT_os_init_task_get_info_test();
    UT_os_task_get_info_test();

    UT_os_geterrorname_test();

    UT_os_tick2micros_test();
    UT_os_milli2ticks_test();

    UT_OS_LOG_MACRO("\n============================================")
    UT_os_getlocaltime_test();
    UT_OS_LOG_MACRO("============================================\n")
    UT_os_setlocaltime_test();

    UT_os_teardown("ut_oscore");
}