VirtualBox

Changeset 96849 in vbox for trunk/src/VBox/Main/testcase


Ignore:
Timestamp:
Sep 24, 2022 1:55:24 AM (2 years ago)
Author:
vboxsync
Message:

fixed tstOVF so it no longer leaves a mess after failure, removed tstOVF from ValidationKit blacklist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/tstOVF.cpp

    r96407 r96849  
    232232                    pcszType = "sound";
    233233                break;
     234                               
     235                                case VirtualSystemDescriptionType_SettingsFile:
     236                    pcszType = "settings";
     237                break;
     238                               
     239                                case VirtualSystemDescriptionType_BaseFolder:
     240                    pcszType = "basefolder";
     241                break;
     242                               
     243                                case VirtualSystemDescriptionType_PrimaryGroup:
     244                    pcszType = "primarygroup";
     245                break;
    234246
    235247                default:
    236                     throw MyError(E_UNEXPECTED, "Invalid VirtualSystemDescriptionType\n");
     248                    throw MyError(E_UNEXPECTED, "Invalid VirtualSystemDescriptionType (enum)\n");
    237249                break;
    238250            }
     
    289301    RTPrintf("%s: copying ovf-dummy.vmdk to \"%s\"...\n", pcszPrefix, pcszDest);
    290302
     303        if (FILE *file = fopen(pcszDest, "r"))
     304        {
     305                fclose(file);
     306                RTFileDelete(pcszDest);
     307        }
     308
    291309    int vrc = RTFileCopy(szSrc, szDst);
    292310    if (RT_FAILURE(vrc)) throw MyError(0, Utf8StrFmt("Cannot copy ovf-dummy.vmdk to %s: %Rra\n", pcszDest, vrc).c_str());
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