Changeset 92019 in vbox for trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
- Timestamp:
- Oct 25, 2021 10:10:32 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp
r92004 r92019 127 127 VKAT_TEST_OPT_HOST_ATS_PORT, 128 128 VKAT_TEST_OPT_MODE, 129 VKAT_TEST_OPT_NO_AUDIO_OK, 129 130 VKAT_TEST_OPT_NO_VERIFY, 130 131 VKAT_TEST_OPT_OUTDIR, … … 194 195 { "--probe-backends", VKAT_TEST_OPT_PROBE_BACKENDS, RTGETOPT_REQ_NOTHING }, 195 196 { "--mode", VKAT_TEST_OPT_MODE, RTGETOPT_REQ_STRING }, 197 { "--no-audio-ok", VKAT_TEST_OPT_NO_AUDIO_OK, RTGETOPT_REQ_NOTHING }, 196 198 { "--no-verify", VKAT_TEST_OPT_NO_VERIFY, RTGETOPT_REQ_NOTHING }, 197 199 { "--tag", VKAT_TEST_OPT_TAG, RTGETOPT_REQ_STRING }, … … 717 719 " Default: 6052"; /* ATS_TCP_DEF_BIND_PORT_VALKIT */ 718 720 case VKAT_TEST_OPT_MODE: return "Test mode to use when running the tests"; 721 case VKAT_TEST_OPT_NO_AUDIO_OK: return "Enables running without any found audio hardware (e.g. servers)"; 719 722 case VKAT_TEST_OPT_NO_VERIFY: return "Skips the verification step"; 720 723 case VKAT_TEST_OPT_OUTDIR: return "Output directory to use"; … … 761 764 bool fPcmSigned = true; 762 765 bool fProbeBackends = false; 766 bool fNoAudioOk = false; 763 767 764 768 const char *pszGuestTcpAddr = NULL; … … 816 820 break; 817 821 822 case VKAT_TEST_OPT_NO_AUDIO_OK: 823 fNoAudioOk = true; 824 break; 825 818 826 case VKAT_TEST_OPT_NO_VERIFY: 819 827 TstEnv.fSkipVerify = true; … … 942 950 rc = AudioTestDriverStackPerformSelftest(); 943 951 if (RT_FAILURE(rc)) 944 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Testing driver stack failed: %Rrc\n", rc); 952 { 953 if (!fNoAudioOk) 954 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Testing driver stack failed: %Rrc\n", rc); 955 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Warning: Testing driver stack not possible (%Rrc), but --no-audio-ok was specified. Running on a server without audio hardware?\n"); 956 } 945 957 946 958 AUDIOTESTDRVSTACK DrvStack; … … 952 964 true /* fEnabledIn */, true /* fEnabledOut */, TstEnv.IoOpts.fWithDrvAudio); /** @todo Make in/out configurable, too. */ 953 965 if (RT_FAILURE(rc)) 954 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Unable to init driver stack: %Rrc\n", rc); 966 { 967 if (!fNoAudioOk) 968 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Unable to init driver stack: %Rrc\n", rc); 969 RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Warning: Initializing driver stack not possible (%Rrc), but --no-audio-ok was specified. Running on a server without audio hardware?\n"); 970 } 955 971 956 972 PPDMAUDIOHOSTDEV pDev; 957 973 rc = audioTestDevicesEnumerateAndCheck(&DrvStack, TstEnv.szDev, &pDev); 958 974 if (RT_FAILURE(rc)) 959 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Enumerating device(s) failed: %Rrc\n", rc); 975 { 976 if (!fNoAudioOk) 977 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Enumerating device(s) failed: %Rrc\n", rc); 978 } 960 979 961 980 /* For now all tests have the same test environment and driver stack. */
Note:
See TracChangeset
for help on using the changeset viewer.