Exemplo n.º 1
0
/**
**building test tree end 
**/
int test_ram(void)
{

#ifdef WILDDOG_SELFTEST
        int res = 0;
        u8 tree_m=0, n=0;
        u8 request_num[4] = {1,WILDDOG_REQ_QUEUE_NUM/2,WILDDOG_REQ_QUEUE_NUM,WILDDOG_REQ_QUEUE_NUM * 2};
        u8 url[strlen(TEST_URL)+20];
#if 0
        if( (d_ramtree_num[TEST_TREE_ITEMS] + TEST_PROTO_COVER) > WILDDOG_PROTO_MAXSIZE )
        {
            printf("please modify WILDDOG_PROTO_MAXSIZE to %lu ,in wilddog_config.h \n",\
                (d_ramtree_num[TEST_TREE_ITEMS] + TEST_PROTO_COVER));
            return -1;
        }
 #endif       
        if( (res = test_buildtreeFunc() ) < 0 )
                return res;
        ramtest_titile_printf();
    
        for( tree_m=0; tree_m < TEST_TREE_ITEMS; tree_m++)
        {
            for( n=0; n <4; n++)
            {
                memset(url,0,sizeof(url));
                sprintf((char*)url,"%s%s",TEST_URL,p_ramtree_url[tree_m]);
                ramtest_handle(url,d_ramtree_num[tree_m],request_num[n]);
            }
        }
        ramtest_end_printf();
#endif
        return 0;

}
Exemplo n.º 2
0
/**
 *  Application start
 */
void application_start( void )
{
    /* Initialise the device */
    wiced_init();
    /* Run the main application function */
    wiced_network_up(WICED_STA_INTERFACE, WICED_USE_EXTERNAL_DHCP_SERVER, NULL);
#if TEST_TYPE == TEST_RAM
    {
        u8 m=0, n=0;
        u8 tree_num[3] = {1,2,3};
        u8 request_num[4] = {1,16,32,64};
        ramtest_titile_printf();
        //  ramtest(tree_num[0],1);

        for( m=0; m < 3; m++)
        {
            for( n=0; n < 4; n++)
            {
                ramtest_handle(tree_num[m],request_num[n]);
            }
        }
        ramtest_end_printf();
    }
#endif
#if TEST_TYPE == TEST_TIME
    performtest_all();
#endif
#if TEST_TYPE == TEST_STAB_CYCLE
    stab_test_cycle();
#endif
#if TEST_TYPE == TEST_STAB_FULLLOAD
    stab_test_fullLoad();
#endif
}