Exceeded maximum allowed command line length #3570
Unanswered
mmcd-2021
asked this question in
Community Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I've encountered an "Exceeded maximum allowed command line length" exception while trying to run googletest. I've been building and running tests in a Visual Studio 2017 Google Test project for quite some time without issue. The library I'm testing continues to grow in size and it seems it's reached a size (number of symbols in the DLL I suspect) where googletest puts too much information on the command line (maximum command line length is 8191 characters in Windows OS). This causes test discovery to cease and 0 tests to be run.
It's a Visual C++ project in Visual Studio 2017 on Windows 10.
I'm able to get it working again by removing a few classes from the library I'm testing. The issue doesn't seem dependent on number of tests in the googletest project but rather the number of symbols in the library being tested.
I will post the exception and stack trace below. The output mentions "enable debug mode for more information" but I'm not sure where to enable debug mode for googletest. The Test Explorer window is open in Visual Studio and the projects have been built in Debug. There are normally 3251 tests but with this error none are discovered. The same issue is seen when running the project from the command line outside of Visual Studio.
If anyone has any insight, a workaround or could point me to somewhere more appropriate to look it would be appreciated.
Thanks,
The following errors and warnings have occured during test execution (enable debug mode for more information):
ERROR: Exception while running tests: System.Exception: Exceeded maximum allowed command line length (-3352) after including 0 tests (next string length is 44)
at GoogleTestAdapter.Runners.CommandLineGenerator.JoinTestsUpToMaxLength(List
1 testCases, Int32 maxLength, List
1& includedTestCases)at GoogleTestAdapter.Runners.CommandLineGenerator.GetFinalCommandLines(String baseCommandLine)
at GoogleTestAdapter.Runners.CommandLineGenerator.GetCommandLines()
at GoogleTestAdapter.Runners.SequentialTestRunner.RunTestsFromExecutable(String executable, String workingDir, IDictionary
2 envVars, IEnumerable
1 testCasesToRun, String userParameters, Boolean isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher, IProcessExecutor executor)at GoogleTestAdapter.Runners.SequentialTestRunner.<>c__DisplayClass9_2.b__0()
at GoogleTestAdapter.Settings.SettingsWrapper.ExecuteWithSettingsForExecutable(String executable, Action action, ILogger logger)
at GoogleTestAdapter.Runners.SequentialTestRunner.RunTests(IEnumerable
1 testCasesToRun, String baseDir, String workingDir, String userParameters, Boolean isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher, IProcessExecutor executor) at GoogleTestAdapter.Runners.PreparingTestRunner.RunTests(IEnumerable
1 testCasesToRun, String baseDir, String workingDir, String userParameters, Boolean isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher, IProcessExecutor executor)[2021-09-15 16:49:08 Informational] ========== Run test finished: 0 run (0:00:02.3910001) ==========
Beta Was this translation helpful? Give feedback.
All reactions