VirtualBox

Ignore:
Timestamp:
Sep 6, 2021 9:35:26 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Separated the audio testing and the actual audio verification into two steps to have a more fine-grained result in the test manager. Also, now using more meaningful test tags which contain a timestamp and the VM name for easier retrieval / identification. ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r91088 r91119  
    670670                    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Verification skipped\n");
    671671
    672                 RTFileDelete(pTstEnv->u.Host.szPathTestSetGuest);
    673                 RTFileDelete(pTstEnv->u.Host.szPathTestSetValKit);
     672                if (!pTstEnv->fSkipVerify)
     673                {
     674                    RTFileDelete(pTstEnv->u.Host.szPathTestSetGuest);
     675                    RTFileDelete(pTstEnv->u.Host.szPathTestSetValKit);
     676                }
     677                else
     678                    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Leaving test set files behind\n");
    674679            }
    675680        }
     
    750755    int         rc;
    751756
    752     const char *pszTag        = NULL; /* Custom tag to use. Can be NULL if not being used. */
    753757    PCPDMDRVREG pDrvReg       = AudioTestGetDefaultBackend();
    754758    bool        fWithDrvAudio = false;
     
    862866
    863867            case VKAT_TEST_OPT_TAG:
    864                 pszTag = ValueUnion.psz;
     868                rc = RTStrCopy(TstEnv.szTag, sizeof(TstEnv.szTag), ValueUnion.psz);
     869                if (RT_FAILURE(rc))
     870                    return RTMsgErrorExit(RTEXITCODE_FAILURE, "Tag invalid, rc=%Rrc", rc);
    865871                break;
    866872
     
    978984
    979985    const bool fPacked = AudioTestSetIsPacked(pszPathSet);
     986
    980987    if (fPacked)
    981988    {
    982989        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test set is an archive and needs to be unpacked\n");
    983990
    984         char szPathTemp[RTPATH_MAX];
    985         rc = RTPathTemp(szPathTemp, sizeof(szPathTemp));
     991        if (!RTFileExists(pszPathSet))
     992        {
     993            RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Test set '%s' does not exist\n", pszPathSet);
     994            rc = VERR_FILE_NOT_FOUND;
     995        }
     996        else
     997            rc = VINF_SUCCESS;
     998
    986999        if (RT_SUCCESS(rc))
    9871000        {
    988             RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Using temporary directory '%s'\n", szPathTemp);
    989 
    990             rc = RTPathJoin(szPathExtracted, sizeof(szPathExtracted), szPathTemp, "vkat-testset-XXXX");
     1001            char szPathTemp[RTPATH_MAX];
     1002            rc = RTPathTemp(szPathTemp, sizeof(szPathTemp));
    9911003            if (RT_SUCCESS(rc))
    9921004            {
    993                 rc = RTDirCreateTemp(szPathExtracted, 0755);
     1005                RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Using temporary directory '%s'\n", szPathTemp);
     1006
     1007                rc = RTPathJoin(szPathExtracted, sizeof(szPathExtracted), szPathTemp, "vkat-testset-XXXX");
    9941008                if (RT_SUCCESS(rc))
    9951009                {
    996                     RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Unpacking archive to '%s'\n", szPathExtracted);
    997                     rc = AudioTestSetUnpack(pszPathSet, szPathExtracted);
     1010                    rc = RTDirCreateTemp(szPathExtracted, 0755);
    9981011                    if (RT_SUCCESS(rc))
    999                         RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Archive successfully unpacked\n");
     1012                    {
     1013                        RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Unpacking archive to '%s'\n", szPathExtracted);
     1014                        rc = AudioTestSetUnpack(pszPathSet, szPathExtracted);
     1015                        if (RT_SUCCESS(rc))
     1016                            RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Archive successfully unpacked\n");
     1017                    }
    10001018                }
    10011019            }
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