tstOVF.cpp revision 22ea904a6fe5c95f54c4374502747cc844ce8204
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * tstOVF - testcases for OVF import and export
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * Copyright (C) 2010 Oracle Corporation
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * This file is part of VirtualBox Open Source Edition (OSE), as
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * available from http://www.virtualbox.org. This file is free software;
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * you can redistribute it and/or modify it under the terms of the GNU
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * General Public License (GPL) as published by the Free Software
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * Foundation, in version 2 as it comes in the "COPYING" file of the
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Joosteusing namespace com;
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste///////////////////////////////////////////////////////////////////////////////
c1294b91b94412bc057d660950ed0d3b3091bd38Jaco Jooste * Quick hack exception structure.
struct MyError
const char *pcsz,
if (pProgress)
else if (rc)
const char *pcszOVF0,
for (uint32_t u = 0;
++u2)
const char *pcszType;
for (size_t u = 0;
* Copies ovf-testcases/ovf-dummy.vmdk to the given target and appends that
if (RT_FAILURE(vrc)) throw MyError(0, Utf8StrFmt("Cannot copy ovf-dummy.vmdk to %s: %Rra\n", pcszDest, vrc).c_str());
RTR3Init();
// testcase 1: import ovf-joomla-0.9/joomla-1.1.4-ovf.ovf
importOVF("joomla-0.9", pVirtualBox, "ovf-testcases/ovf-joomla-0.9/joomla-1.1.4-ovf.ovf", llMachinesCreated);
// testcase 2: import ovf-winxp-vbox-sharedfolders/winxp.ovf
copyDummyDiskImage(llFiles2Delete, "ovf-testcases/ovf-winxp-vbox-sharedfolders/Windows 5.1 XP 1 merged.vmdk");
importOVF("winxp-vbox-sharedfolders", pVirtualBox, "ovf-testcases/ovf-winxp-vbox-sharedfolders/winxp.ovf", llMachinesCreated);
catch (MyError &e)
++it)
// Bstr bstrUUID(uuid.toUtf16());
// u2 < aMediumAttachments.size();
catch (MyError &e)
++it)
return rc;