VisualGDB & GoogleTestFramework in Commandline

Sysprogs forums Forums VisualGDB VisualGDB & GoogleTestFramework in Commandline

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #21083
    ds1988
    Participant

    Hello everybody,

    we have a problem running VisualGDB from the commandline. We discovered the problem while preparing a TFS task for VisualGDB.

    For normal projects everything is fine. The codefiles are copied to the build machine and are compiled successfully.

    The problem occurs when we are compiling a project containing the google test framework. The compilation process also succeeds, but then the launch failed.

    I have no idea why it fails, or what it es trying. Executing the test?

    The problem only occurs in the commandline (VisualGDB.exe project-Debug.vgdbsettings).

    When using the VisualStudio project everything works and the tests are listed in the TestExplorer and can be executed.

    This is the tail of the output:

    Build succeeded.

    “E:\work\1\s\project.vcxproj” (default target) (1) ->
    (ClCompile target) ->
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\src\gtest-death-test.cc [E:\work\1\s\project.vcxproj]
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\src\gtest-filepath.cc [E:\work\1\s\project.vcxproj]
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\src\gtest-port.cc [E:\work\1\s\project.vcxproj]
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\src\gtest-printers.cc [E:\work\1\s\project.vcxproj]
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\src\gtest-test-part.cc [E:\work\1\s\project.vcxproj]
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\src\gtest-typed-test.cc [E:\work\1\s\project.vcxproj]
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\src\gtest.cc [E:\work\1\s\project.vcxproj]
    C:\Program Files (x86)\Sysprogs\VisualGDB\MSBuild\Targets\gcc.targets(85,5): warning : No remote path corresponds to C:\Users\Admin\AppData\Local\VisualGDB\TestFrameworks\com.sysprogs.unittest.googletest\Platforms\SysprogsTestHooks.cpp [E:\work\1\s\project.vcxproj]

    8 Warning(s)
    0 Error(s)

    Time Elapsed 00:00:12.87
    Build/launch failed: Failed to find an IDE project corresponding to E:\work\1\s\project-Debug.vgdbsettings

    Do you have any idea what is gonig wrong?

    Greetings

    Carsten

    #21115
    support
    Keymaster

    Hi,

    No problem, we can help you with this. For MSBuild-based (and CMake-based) projects the .vgdbsettings file does not contain sufficient information to run the tests (e.g. the executable name is derived by MSBuild during compile time). VisualGDB solves this by caching those settings in a .vgdbtestcontainer file when you run the tests from the IDE.

    Hence instead of running VisualGDB on the .vgdbsettings file, please run it on the .vgdbtestcontainer file as shown below:

    VisualGDB /runtests <file.vgdbtestcontainer>

    You can also configure VisualGDB to generate the test container file during the regular build (see the Generate a test container file property in VS Project Properties).

    #21124
    ds1988
    Participant

    Hi,

    we already figured out that we need the vgdbtestcontainer.

    The generation of the container during the build is indeed our prefered way.

    The problem ist that our VS Project Properties does not contain a “Generate a test container file” property.

    Greetings

    Carsten

    Attachments:
    You must be logged in to view attached files.
    #21135
    support
    Keymaster

    Hi,

    No problem, please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.3.2313.msi

    #21170
    ds1988
    Participant

    Hi,

    thanks a lot now the we can create the vgdbtestcontainer during the build.

    When we build the project with msbuild everything is fine and the container is created.

    Running “VisualGDB /runtests file.vgdbtestcontainer outputfile” works. So we need two steps build and a seperate test step in our TFS Task.

    But when we call VisualGDB using the settingsfile as a parameter (VisualGDB.exe project-Debug.vgdbsettings) we still get the old error:

    Build/launch failed: Failed to find an IDE project corresponding to E:\work\1\s\project-Debug.vgdbsettings

    Any idea why this error still occurs?

    Is the version of visualgdb (VisualGDB-5.4.3.2313.msi) the preview version or the final version.

     

    Greetings

    Carsten

    • This reply was modified 5 years, 10 months ago by ds1988.
    #21174
    support
    Keymaster

    Hi,

    This is by design. The MSBuild-based projects must be build by invoking either devenv.exe, or msbuild.exe (VisualGDB would internally run msbuild.exe if you try building the .vgdbsettings file, but it looks like something is preventing it from finding the correct .vcxproj file in your case). Please try using the following command line:

    msbuild.exe <.vcxproj file> /property:Platform=VisualGDB /property:Configuration=Debug
    #21283
    ds1988
    Participant

    Hi,

    using msbuild.exe works fine.

    But we have another question. We tried to upgrade the licence of our build machine from a trial to a normal one. But this does not seem to work without an internetconnection.

    Is there a way to upgrade without an internetconnection?

    #21284
    support
    Keymaster

    Hi,

    Normally VisualGDB should display a manual activation window if there is no Internet connection. If you don’t have Visual Studio installed on the build machine, please try running VisualGDB.exe /about to open the “About VisualGDB” window and enter the license key there.

    #21339
    ds1988
    Participant

    Hi,

    while activating the trail version an activation window was shown. But not for upgrading. Is it possible to reset the license?

    When i call visualgdb.exe /about i get an exception while clicking a button. Visualgdb.exe /intro shows the trail licence and the purchased licence.

    Attachments:
    You must be logged in to view attached files.
    #21348
    support
    Keymaster

    Hi,

    Sorry, looks like the exception screenshot was not attached properly. Could you please click on “details” and copy the full exception text with the call stack?

    #21367
    ds1988
    Participant

    Hi,

    i did not notice, that the file was too big.

    PS C:\Program Files (x86)\Sysprogs\VisualGDB> .\VisualGDB.exe /about
    Build/launch failed: System.InvalidOperationException: DialogResult can be set only after Window is created and shown as dialog.
    at System.Windows.Window.set_DialogResult(Nullable`1 value)
    at VisualGDB.WPF.AboutWindow.Button_Click_4(Object sender, RoutedEventArgs e)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
    at System.Windows.Controls.Primitives.ButtonBase.OnClick()
    at System.Windows.Controls.Button.OnClick()
    at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
    at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
    at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
    at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
    at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
    at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
    at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
    at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
    at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
    at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
    at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
    at System.Windows.Input.InputManager.ProcessStagingArea()
    at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
    at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
    at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
    at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
    at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
    at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
    at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
    at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
    at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
    at System.Windows.Application.RunDispatcher(Object ignore)
    at System.Windows.Application.RunInternal(Window window)
    at System.Windows.Application.Run(Window window)
    at m11.d(String[] a)
    at m11.a(String[] a)

    #21373
    support
    Keymaster

    Hi,

    No problem, please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.3.2349.msi

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.