Changeset 1238 for pjproject/trunk


Ignore:
Timestamp:
May 1, 2007 10:42:22 AM (18 years ago)
Author:
bennylp
Message:

Ported PJLIB and PJLIB-TEST to Symbian!

Location:
pjproject/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/build.symbian/00.bat

    r1235 r1238  
    11rem set MWSym2Libraries=1 
    2 set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\ 
     2set EPOCROOT=\Symbian\9.1\S60_3rd\ 
     3rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\ 
    34rem set EPOCROOT=\Symbian\UIQ3SDK\ 
    45bldmake bldfiles 
  • pjproject/trunk/build.symbian/01.bat

    r1235 r1238  
    22rem set MWSym2Libraries=\Symbian\9.1\S60_3rd\Epoc32\release\winscw\udeb 
    33 
    4 set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\ 
     4set EPOCROOT=\Symbian\9.1\S60_3rd\ 
     5rem set EPOCROOT=\Symbian\9.1\S60_3rd_MR_2\ 
    56call abld build -v vs6 udeb 
  • pjproject/trunk/build.symbian/pjlib_test.mmp

    r1235 r1238  
    4646SOURCE  main_symbian.cpp 
    4747 
     48DOCUMENT test.h 
    4849 
    4950SYSTEMINCLUDE   ..\pjlib\include 
  • pjproject/trunk/pjlib/src/pjlib-test/errno.c

    r974 r1238  
    103103     * Unix errors 
    104104     */ 
    105 #   ifdef EINVAL 
     105#   if defined(EINVAL) && !defined(PJ_SYMBIAN) 
    106106    rc = PJ_STATUS_FROM_OS(EINVAL); 
    107107    pj_set_os_error(rc); 
  • pjproject/trunk/pjlib/src/pjlib-test/ioq_tcp.c

    r974 r1238  
    537537static int compliance_test_2(void) 
    538538{ 
     539#if defined(PJ_SYMBIAN) && PJ_SYMBIAN!=0 
     540    enum { MAX_PAIR = 1, TEST_LOOP = 2 }; 
     541#else 
    539542    enum { MAX_PAIR = 4, TEST_LOOP = 2 }; 
     543#endif 
    540544 
    541545    struct listener 
  • pjproject/trunk/pjlib/src/pjlib-test/pool_perf.c

    r974 r1238  
    6161} 
    6262 
     63/* Symbian doesn't have malloc()/free(), so we use new/delete instead */ 
     64#if defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0 
     65 
     66static int pool_test_malloc_free() 
     67{ 
     68    int i; /* must be signed */ 
     69 
     70    for (i=0; i<COUNT; ++i) { 
     71        p[i] = new char[sizes[i]]; 
     72        if (!p[i]) { 
     73            PJ_LOG(3,(THIS_FILE,"   error: malloc failed to allocate %d bytes", 
     74                      sizes[i])); 
     75            --i; 
     76            while (i >= 0) 
     77                delete [] p[i], --i; 
     78            return -1; 
     79        } 
     80        *p[i] = '\0'; 
     81    } 
     82 
     83    for (i=0; i<COUNT; ++i) { 
     84        delete [] p[i]; 
     85    } 
     86 
     87    return 0; 
     88} 
     89 
     90#else   /* PJ_SYMBIAN */ 
     91 
    6392static int pool_test_malloc_free() 
    6493{ 
     
    84113    return 0; 
    85114} 
     115 
     116#endif /* PJ_SYMBIAN */ 
    86117 
    87118int pool_perf_test() 
     
    141172    else 
    142173        best = pool_time2, worst = pool_time; 
     174     
     175    /* avoid division by zero */ 
     176    if (best==0) best=1; 
     177    if (worst==0) worst=1; 
    143178 
    144179    PJ_LOG(3, (THIS_FILE, "..pool speedup over malloc best=%dx, worst=%dx",  
  • pjproject/trunk/pjlib/src/pjlib-test/sock.c

    r1235 r1238  
    370370        goto on_error; 
    371371 
    372 // This test will fail on S60 3rd Edition MR2 
    373 #if 0 
     372    /* Disable this test on Symbian since UDP connect()/send() failed 
     373     * with S60 3rd edition (including MR2). 
     374     * See http://www.pjsip.org/trac/ticket/264 
     375     */     
     376#if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0 
    374377    /* connect() the sockets. */ 
    375378    rc = pj_sock_connect(cs, &dstaddr, sizeof(dstaddr)); 
  • pjproject/trunk/pjlib/src/pjlib-test/sock_perf.c

    r1235 r1238  
    159159    PJ_LOG(3,("", "...benchmarking socket " 
    160160                  "(2 sockets, packet=512, single threaded):")); 
    161      
     161 
     162    /* Disable this test on Symbian since UDP connect()/send() failed 
     163     * with S60 3rd edition (including MR2). 
     164     * See http://www.pjsip.org/trac/ticket/264 
     165     */     
     166#if !defined(PJ_SYMBIAN) || PJ_SYMBIAN==0 
    162167    /* Benchmarking UDP */ 
    163168    rc = sock_producer_consumer(PJ_SOCK_DGRAM, 512, LOOP, &bandwidth); 
    164169    if (rc != 0) return rc; 
    165170    PJ_LOG(3,("", "....bandwidth UDP = %d KB/s", bandwidth)); 
     171#endif 
    166172 
    167173    /* Benchmarking TCP */ 
  • pjproject/trunk/pjlib/src/pjlib-test/test.h

    r1235 r1238  
    2222#include <pj/types.h> 
    2323 
    24 #define GROUP_LIBC                  0 
    25 #define GROUP_OS                    0 
    26 #define GROUP_DATA_STRUCTURE        0 
     24#define GROUP_LIBC                  1 
     25#define GROUP_OS                    1 
     26#define GROUP_DATA_STRUCTURE        1 
    2727#define GROUP_NETWORK               1 
    2828#if defined(PJ_SYMBIAN) 
     
    3232#endif 
    3333 
    34 #if defined(PJ_SYMBIAN) 
    35 #   define INCLUDE_ERRNO_TEST       0 
    36 #else 
    37 #   define INCLUDE_ERRNO_TEST       GROUP_LIBC 
    38 #endif 
     34#define INCLUDE_ERRNO_TEST          GROUP_LIBC 
    3935#define INCLUDE_TIMESTAMP_TEST      GROUP_OS 
    4036#define INCLUDE_EXCEPTION_TEST      GROUP_LIBC 
     
    4238#define INCLUDE_LIST_TEST           GROUP_DATA_STRUCTURE 
    4339#define INCLUDE_POOL_TEST           GROUP_LIBC 
    44 #define INCLUDE_POOL_PERF_TEST      (PJ_HAS_MALLOC && GROUP_LIBC) 
     40#define INCLUDE_POOL_PERF_TEST      GROUP_LIBC 
    4541#define INCLUDE_STRING_TEST         GROUP_DATA_STRUCTURE 
    4642#define INCLUDE_FIFOBUF_TEST        0   // GROUP_DATA_STRUCTURE 
     
    5248#define INCLUDE_THREAD_TEST         (PJ_HAS_THREADS && GROUP_OS) 
    5349#define INCLUDE_SOCK_TEST           GROUP_NETWORK 
    54 #if defined(PJ_SYMBIAN) 
    55 #   define INCLUDE_SOCK_PERF_TEST   0 
    56 #else 
    57 #   define INCLUDE_SOCK_PERF_TEST   GROUP_NETWORK 
    58 #endif 
     50#define INCLUDE_SOCK_PERF_TEST      GROUP_NETWORK 
    5951#define INCLUDE_SELECT_TEST         GROUP_NETWORK 
    6052#define INCLUDE_UDP_IOQUEUE_TEST    GROUP_NETWORK 
Note: See TracChangeset for help on using the changeset viewer.