IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17515 for trunk/psLib/test/sys


Ignore:
Timestamp:
May 4, 2008, 2:09:04 PM (18 years ago)
Author:
eugene
Message:

merging from eam_branch_20080430 : cleanups for tests, minor fixes from tests, reduced verbosity level in some places, add UPDATE and RESET directives to MULTI and METADATA in config files

Location:
trunk/psLib/test/sys
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/sys/tap_psError.c

    r13084 r17515  
    55 *  @author  Eric Van Alst, MHPCC
    66 *
    7  *  @version $Revision: 1.6 $  $Name: not supported by cvs2svn $
    8  *  @date  $Date: 2007-05-01 00:08:52 $
     7 *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
     8 *  @date  $Date: 2008-05-05 00:09:04 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1919#include "pstap.h"
    2020
     21// XXX in this file, several operations are only validated by printing an output to the screen.   
     22// we should define an output file and compare the contents of the output file to expectations.
     23// I've commented out these features for now
     24
     25# if (0)
    2126// Function used in testError02 to verify the psErrorStackPrintV function
    2227static void myErrorStackPrint(
     
    3237    va_end(ap);
    3338}
    34 
     39# endif
    3540
    3641psS32 main( psS32 argc, char* argv[] )
     
    8388            psErrorCode code=PS_ERR_BAD_PARAMETER_VALUE;
    8489            ok(psError(code, true, "Error code = %d", code) == code, "Failed return value verify.");
    85             psErrorStackPrint(stderr,"ERROR STACK PRINT Test1A");
     90            // psErrorStackPrint(stderr,"ERROR STACK PRINT Test1A");
    8691            ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    8792        }
     
    9499            ok(psError(code+1, true, "Error code = %d", code+1) == code+1,
    95100                 "Failed return with empty string.");
    96             psErrorStackPrint(stderr,"ERROR STACK PRINT Test1B");
     101            // psErrorStackPrint(stderr,"ERROR STACK PRINT Test1B");
    97102            ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    98103        }
     
    104109            ok(psError(-1, true, "Error code = %d", -1) == -1,
    105110                 "Failed return with undefined code.");
    106             psErrorStackPrint(stderr,"ERROR STACK PRINT Test1D");
     111            // psErrorStackPrint(stderr,"ERROR STACK PRINT Test1D");
    107112            ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    108113        }
     
    115120            ok(psError(code, false, "Error code = %d", code) == code,
    116121                "Failed return with false new arg.");
    117             psErrorStackPrint(stderr,"ERROR STACK PRINT Test1E");
     122            // psErrorStackPrint(stderr,"ERROR STACK PRINT Test1E");
    118123            ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    119124        }
     
    124129            psMemId id = psMemGetId();
    125130            ok(psError(9, true, "Errno code = %d", 9) == 9, "Error Code" );
    126             psErrorStackPrint(stderr,"ERROR STACK PRINT Test1F");
     131            // psErrorStackPrint(stderr,"ERROR STACK PRINT Test1F");
    127132            ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    128133        }
     
    138143            ok(psError(code, true, "Error code = %d", code) == code,
    139144                "Failed return value verify.");
    140             myErrorStackPrint(stderr,"ERROR STACK PRINT Test%dA",2);
     145            // myErrorStackPrint(stderr,"ERROR STACK PRINT Test%dA",2);
    141146            ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    142147        }
  • trunk/psLib/test/sys/tap_psString.c

    r13799 r17515  
    2020 *  @author  Eric Van Alst, MHPCC
    2121 *
    22  *  @version $Revision: 1.10 $  $Name: not supported by cvs2svn $
    23  *  @date  $Date: 2007-06-13 23:32:11 $
     22 *  @version $Revision: 1.11 $  $Name: not supported by cvs2svn $
     23 *  @date  $Date: 2008-05-05 00:09:04 $
    2424 *
    2525 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3838    psLogSetFormat("HLNM");
    3939    psLogSetLevel(PS_LOG_INFO);
    40     plan_tests(68);
     40    plan_tests(65);
    4141
    4242
     
    455455        psFree(str);
    456456
    457         char charStr[10];
    458         ok(!psMemCheckType(PS_DATA_STRING, charStr),
    459             "Input string is a psDataType");
     457        // XXX EAM this function raises an abort since we are trying to test a non-psLib memory block
     458        // char charStr[10];
     459        // ok(!psMemCheckType(PS_DATA_STRING, charStr), "Input string is a psDataType");
     460
    460461        ok(!psMemCheckLeaks (id, NULL, NULL, false), "no memory leaks");
    461462    }
  • trunk/psLib/test/sys/tap_psTrace.c

    r12781 r17515  
    1919    plan_tests(54);
    2020
     21# define DEBUG 1
     22# if (DEBUG)
     23    FILE *output = fopen ("/dev/null", "w");
     24    int outFD = fileno (output);
     25# else
     26    int outFD = 2;
     27# endif
     28
    2129    // testTrace00()
    2230    {
    2331        psMemId id = psMemGetId();
    2432        psS32 lev = 0;
    25         (void)psTraceSetDestination(2);
     33        (void)psTraceSetDestination(outFD);
    2634        for (int i=0;i<10;i++) {
    2735            (void)psTraceSetLevel(".", i);
     
    5866    {
    5967        psMemId id = psMemGetId();
    60         (void)psTraceSetDestination(2);
     68        (void)psTraceSetDestination(outFD);
    6169        (void)psTraceSetLevel(".A.B.C.D.E", 5);
    6270        psTrace(".A.C.D.C",1,"You should not see this");
     
    7280        psMemId id = psMemGetId();
    7381        psTraceReset();
    74         (void)psTraceSetDestination(2);
     82        (void)psTraceSetDestination(outFD);
    7583        (void)psTraceSetLevel(".A.B", 2);
    7684        (void)psTraceSetLevel(".A.B.C.D.E", 5);
     
    97105    {
    98106        psMemId id = psMemGetId();
    99         (void)psTraceSetDestination(2);
     107        (void)psTraceSetDestination(outFD);
    100108
    101109        for (int i=0;i<10;i++) {
     
    134142        for (int nb = 0 ; nb<4;nb++) {
    135143            if (nb == 0)
    136                 (void)psTraceSetDestination(1);
     144                (void)psTraceSetDestination(((outFD == 2) ? 1 : outFD));
    137145            if (nb == 1)
    138                 (void)psTraceSetDestination(2);
     146                (void)psTraceSetDestination(((outFD == 2) ? 2 : outFD));
    139147            if (nb == 2)
    140                 (void)psTraceSetDestination(0);
     148                (void)psTraceSetDestination(((outFD == 2) ? 0 : outFD));
    141149            if (nb == 3)
    142150                (void)psTraceSetDestination(FD);
     
    174182    {
    175183        psMemId id = psMemGetId();
    176         (void)psTraceSetDestination(2);
     184        (void)psTraceSetDestination(outFD);
    177185        (void)psTraceSetLevel(".", 9);
    178186        (void)psTraceSetLevel(".a", 8);
     
    213221    {
    214222        psMemId id = psMemGetId();
    215         (void)psTraceSetDestination(2);
     223        (void)psTraceSetDestination(outFD);
    216224        (void)psTraceSetLevel(".", 9);
    217225        (void)psTraceSetLevel(".a", 8);
     
    287295        ok(!psMemCheckLeaks(id, NULL, NULL, false), "no memory leaks");
    288296    }
     297
     298# if (DEBUG)
     299    close (outFD);
     300# endif
     301
    289302}
Note: See TracChangeset for help on using the changeset viewer.