Exemplo n.º 1
0
/*
** main function runs all the tests
*/
int main (void)
{

  /* Initialize UnitTest */
  UT_Init("ut_cfe_evs");


  /* Test_Init is a test but also MUST be called 1st and only once */
  Test_Init();

  Test_IllegalAppID();

  Test_UnregisteredApp();

  Test_FilterRegistration();

  Test_FilterReset();
  Test_Format();
  Test_Ports();
  Test_Logging();
  Test_WriteApp();
  Test_BadAppCmd();
  Test_EventCmd();
  Test_FilterCmd();
  Test_Misc();

  /* Final report on number of errors */
  UT_ReportFailures();

  exit(0);

}
Exemplo n.º 2
0
//---------------------------------------------------------------------------
static void AppMain( void *unused )
{
    Driver_t *pstUART = DriverList_FindByPath("/dev/tty");
    
#if UNIT_TEST    
    UT_Init();
#endif
    
#if PROFILE_TEST
    ProfileInit();
#endif    

    Driver_Control( pstUART, CMD_SET_BUFFERS, 0, NULL, 32, aucTxBuf );
    {
        K_ULONG ulBaudRate = 57600;
        Driver_Control( pstUART, CMD_SET_BAUDRATE, 0, &ulBaudRate, 0, 0 );
        Driver_Control( pstUART, CMD_SET_RX_DISABLE, 0, 0, 0, 0);
    }
    
    Driver_Open( pstUART );
    Driver_Write( pstUART, 6,(K_UCHAR*)"START\n");

    while(1)
    {

#if PROFILE_TEST
        //---[ API Profiling ]-----------------------------
        Profiler_Start();
        ProfileOverhead();        
        Semaphore_Profiling();
        Mutex_Profiling();
        Thread_Profiling();
        Scheduler_Profiling();
        Profiler_Stop();
                
        ProfilePrintResults();
        Thread_Sleep(500);
#endif        
    }
}