VirtualBox

Changeset 5699

Show
Ignore:
Timestamp:
11/12/07 10:44:11 (1 year ago)
Author:
vboxsync
Message:

Fixed environment parameter for RTProcCreate and a problem with trying to execute tstVdi* images.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Devices/Storage/testcase/tstVDI.cpp

    r4071 r5699  
    101101    RTR3Init(); 
    102102 
    103     RTFileDelete("tstVdiBase.vdi"); 
    104     RTFileDelete("tstVdiDiff.vdi"); 
     103    RTFileDelete("tmpVdiBase.vdi"); 
     104    RTFileDelete("tmpVdiDiff.vdi"); 
    105105 
    106     int rc = dotest("tstVdiBase.vdi", "tstVdiDiff.vdi"); 
     106    int rc = dotest("tmpVdiBase.vdi", "tmpVdiDiff.vdi"); 
    107107    if (!rc) 
    108108        RTPrintf("tstVDI: SUCCESS\n"); 
     
    110110        RTPrintf("tstVDI: FAILURE\n"); 
    111111 
    112     RTFileDelete("tstVdiBase.vdi"); 
    113     RTFileDelete("tstVdiDiff.vdi"); 
     112    RTFileDelete("tmpVdiBase.vdi"); 
     113    RTFileDelete("tmpVdiDiff.vdi"); 
    114114    return !!rc; 
    115115} 
  • trunk/src/testcase/tstRunTestcases.cpp

    r4071 r5699  
    2828#include <iprt/thread.h> 
    2929#include <iprt/err.h> 
     30#include <iprt/env.h> 
    3031 
    3132 
     
    126127static void Process(const char *pszFilter, const char *pszDir) 
    127128{ 
     129    RTENV env; 
     130    int rc = RTEnvClone(&env, RTENV_DEFAULT); 
     131    if (RT_FAILURE(rc)) { 
     132        RTPrintf("tstRunTestcases: Failed to clone environment -> %Rrc\n", rc); 
     133        return; 
     134    } 
    128135    /* 
    129136     * Open and enumerate the directory. 
    130137     */ 
    131138    PRTDIR pDir; 
    132     int rc = RTDirOpenFiltered(&pDir, pszFilter, RTDIRFILTER_WINNT); 
     139    rc = RTDirOpenFiltered(&pDir, pszFilter, RTDIRFILTER_WINNT); 
    133140    if (RT_SUCCESS(rc)) 
    134141    { 
     
    167174                papszArgs[1] = NULL; 
    168175                RTPROCESS Process; 
    169                 rc = RTProcCreate(pszTestcase, papszArgs, NULL, 0, &Process); 
     176                rc = RTProcCreate(pszTestcase, papszArgs, env, 0, &Process); 
    170177                if (RT_SUCCESS(rc)) 
    171178                { 
     
    237244    else 
    238245        RTPrintf("tstRunTestcases: opening '%s' -> %Rrc\n", pszDir, rc); 
     246    RTEnvDestroy(env); 
    239247} 
    240248 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy