VirtualBox

Changeset 50351 in vbox


Ignore:
Timestamp:
Feb 6, 2014 4:21:03 PM (11 years ago)
Author:
vboxsync
Message:

Main/testcase/tstOVF: fixes to make it work reliably (biggest problem was a broken ovf file which needed fixing, rest is cleanup and proper exit code handling), making it work on the testboxes

Location:
trunk/src/VBox/Main/testcase
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/Makefile.kmk

    r50342 r50351  
    8787INSTALLS += ovf-testcases
    8888ovf-testcases_MODE = a+r,u+w
    89 ovf-testcases_INST = $(INST_BIN)ovf-testcases/
     89ovf-testcases_INST = $(INST_TESTCASE)ovf-testcases/
    9090ovf-testcases_SOURCES = \
    9191        ovf-dummy.vmdk \
  • trunk/src/VBox/Main/testcase/ovf-winxp-vbox-sharedfolders/winxp.ovf

    r31882 r50351  
    300300        <StorageController name="IDE Controller" type="PIIX3" PortCount="2" useHostIOCache="true">
    301301          <AttachedDevice type="HardDisk" port="0" device="0">
    302             <Image uuid="{cf2b9350-4d5f-42a2-be70-b85a00c2ec9f}"/>
     302            <Image uuid="{1fc3c37e-079b-477b-a6d7-84c0e8a717ac}"/>
    303303          </AttachedDevice>
    304304          <AttachedDevice type="HardDisk" port="0" device="1">
  • trunk/src/VBox/Main/testcase/tstOVF.cpp

    r50196 r50351  
    8585{
    8686    char szAbsOVF[RTPATH_MAX];
    87     RTPathAbs(pcszOVF0, szAbsOVF, sizeof(szAbsOVF));
     87    RTPathExecDir(szAbsOVF, sizeof(szAbsOVF));
     88    RTPathAppend(szAbsOVF, sizeof(szAbsOVF), pcszOVF0);
    8889
    8990    RTPrintf("%s: reading appliance \"%s\"...\n", pcszPrefix, szAbsOVF);
     
    266267                        const char *pcszDest)
    267268{
     269    char szSrc[RTPATH_MAX];
     270    char szDst[RTPATH_MAX];
     271    RTPathExecDir(szSrc, sizeof(szSrc));
     272    RTPathAppend(szSrc, sizeof(szSrc), "ovf-testcases/ovf-dummy.vmdk");
     273    RTPathExecDir(szDst, sizeof(szDst));
     274    RTPathAppend(szDst, sizeof(szDst), pcszDest);
    268275    RTPrintf("%s: copying ovf-dummy.vmdk to \"%s\"...\n", pcszPrefix, pcszDest);
    269276
    270     int vrc = RTFileCopy("ovf-testcases/ovf-dummy.vmdk", pcszDest);
     277    int vrc = RTFileCopy(szSrc, szDst);
    271278    if (RT_FAILURE(vrc)) throw MyError(0, Utf8StrFmt("Cannot copy ovf-dummy.vmdk to %s: %Rra\n", pcszDest, vrc).c_str());
    272     llFiles2Delete.push_back(pcszDest);
     279    llFiles2Delete.push_back(szDst);
    273280}
    274281
     
    283290    RTR3InitExe(argc, &argv, 0);
    284291
     292    RTEXITCODE rcExit = RTEXITCODE_SUCCESS;
    285293    HRESULT rc = S_OK;
    286294
     
    329337        rc = e.m_rc;
    330338        RTPrintf("%s", e.m_str.c_str());
     339        rcExit = RTEXITCODE_FAILURE;
    331340    }
    332341
     
    361370        rc = e.m_rc;
    362371        RTPrintf("%s", e.m_str.c_str());
     372        rcExit = RTEXITCODE_FAILURE;
    363373    }
    364374
     
    377387    RTPrintf("Shutting down COM...\n");
    378388    com::Shutdown();
    379     RTPrintf ("tstOVF all done!\n");
    380 
    381     return rc;
     389    RTPrintf("tstOVF all done: %s\n", rcExit ? "ERROR" : "SUCCESS");
     390
     391    return rcExit;
    382392}
    383393
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