VirtualBox

Changeset 5699 in vbox for trunk/src/testcase


Ignore:
Timestamp:
Nov 12, 2007 9:44:11 AM (17 years ago)
Author:
vboxsync
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette