VisualGDB & GoogleTestFramework in Commandline

Sysprogs forums Forums VisualGDB VisualGDB & GoogleTestFramework in Commandline

This topic contains 5 replies, has 2 voices, and was last updated by  support 1 day, 2 hours ago.

Viewing 6 posts - 1 through 6 (of 6 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:

    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 1 day, 12 hours 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:

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.