Exemplo n.º 1
0
int main(int argc, char* argv[])
{
    arg_SetArgs((size_t)argc, (char**)argv);

    LE_DEBUG("== Starting Executable '%s' ==", STRINGIZE(LE_EXECUTABLE_NAME));

    LE_LOG_SESSION = log_RegComponent( STRINGIZE(LE_COMPONENT_NAME), &LE_LOG_LEVEL_FILTER_PTR);

    // Connect to the Log Control Daemon.
    // The sooner we can connect to the Log Control Daemon, the better, because that is when
    // we obtain any non-default log settings that have been set using the interactive log
    // control tool.  However, we can't do that until we have a working IPC messaging system.
    // However, the Log Control Daemon shouldn't try to connect to itself.
    // Also, the Service Directory shouldn't try to use the messaging system, so it can't
    // connect to the Log Control Daemon either.  Besides, the Service Directory starts before
    // the Log Control Daemon starts.
    #ifndef NO_LOG_CONTROL
        log_ConnectToControlDaemon();
    #endif

    //@todo: Block all signals that the user intends to handle with signal events.

    // Queue up all the component initialization functions to be called by the Event Loop after
    // it processes any messages that were received from the Log Control Daemon.
    event_QueueComponentInit(_le_event_InitializeComponent);


    LE_DEBUG("== Starting Event Processing Loop ==");

    le_event_RunLoop();

    LE_FATAL("SHOULDN'T GET HERE!");
}
Exemplo n.º 2
0
//--------------------------------------------------------------------------------------------------
int main
(
    int argc,
    char *argv[]
)
{
    LE_LOG_SESSION = log_RegComponent( "sms", &LE_LOG_LEVEL_FILTER_PTR);

    arg_SetArgs(argc,argv);

    le_log_TraceRef_t traceRef = le_log_GetTraceRef( "smsPdu" );

    le_log_SetFilterLevel(LE_LOG_DEBUG);
    le_log_EnableTrace(traceRef);

    // Init the test case / test suite data structures
    smsPdu_Initialize();

    // Init pa simu
    pa_simSimu_Init();

    // Init le_sim
    le_sim_Init();

    pa_simSimu_SetPin("0000");
    pa_sms_SetSmsc("+33123456789");

    // Init the sms PA Simu
    sms_simu_Init();

    //EnterPin Code
    pa_sim_EnterPIN(PA_SIM_PIN, "0000");

    LE_INFO("======== Start UnitTest of SMS API ========");

    LE_INFO("======== CDMA PDU Test ========");
    testle_sms_CdmaPduTest();

    LE_INFO("======== SMS PDU Test ========");
    testle_sms_SmsPduTest();

    LE_INFO("======== SMS API Unit Test ========");
    testle_sms_SmsApiUnitTest();

    LE_INFO("======== UnitTest of SMS API ends with SUCCESS ========");

    return 0;
}
Exemplo n.º 3
0
//--------------------------------------------------------------------------------------------------
int main(int argc, char *argv[])
{
    arg_SetArgs(argc,argv);

    // Init pa simu
    pa_simSimu_Init();

    // Set Sim card info in the pa_simu
    SetSimCardInfo();

    // Init le_sim
    le_sim_Init();

    // Handlers addition test
    TestSim_AddHandlers();

    // Test PIN/PUK
    TestSim_PinPuk();

    // Test lock/unlock/change pin
    TestSim_LockUnlockChange();

    // Sim card information test
    TestSim_SimCardInformation();

    // Test home network API
    TestSim_HomeNetwork();

    // Sim toolkit test
    TestSim_Stk();

    // multi-profile test
    TestSim_LocalSwap();

    // Handlers removal test
    TestSim_RemoveHandlers();

    LE_INFO("Tests SIM passed");

    return 0;
}
Exemplo n.º 4
0
//--------------------------------------------------------------------------------------------------
int main(int argc, char *argv[])
{
    LE_LOG_SESSION = log_RegComponent( "mdc", &LE_LOG_LEVEL_FILTER_PTR);

    arg_SetArgs(argc,argv);

    // pa simu init */
    pa_mdcSimu_Init();

    /* init the le_mdc service */
    le_mdc_Init();

    /* init the pa_simu */
    pa_simSimu_Init();

    LE_INFO("======== Start UnitTest of MDC API ========");

    /* Test configuration */
    TestMdc_Configuration();

    /* Test Connection */
    TestMdc_Connection();

    /* Test handler */
    TestMdc_Handler();

    /* Test default profile */
    TestMdc_DefaultProfile();

    /* Test statistics */
    TestMdc_Stat();

    LE_INFO("======== UnitTest of MDC API ends with SUCCESS ========");

    return 0;
}