Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
공지
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
5255 토론

Intel Inspector: Not able to run tests run by Visual Studio's vstest.console.exe

UmeshT
초급자
4,574 조회수

I have test cases in my Visual Studio 2019 solution. It is run by Visual studio by calling the vstest.console.exe. Now I need to check memory leak by running these test cases. Not able to do that using Intel Inspector.

Inputs given by me in Project properties are:

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug (same which have TwoOPT_TestSuite_x64.dll)

 

I get error:

Error: Analysis terminated abnormally.

Application exit code: -1

 

Please let me know what mistake I am doing in providing inputs in project properties. Thanks.

 

0 포인트
9 응답
yuzhang3_intel
중재자
4,524 조회수

Could you provide test app for local reproducing? 

Please provide Inspector version you used. Thanks.

0 포인트
UmeshT
초급자
4,499 조회수

Thank you for your response. The installer used was w_inspector_oneapi_p_2023.0.0.25545.exe

The attached images shows the error message and details.

Please provide guidance in troubleshooting the failure. Thanks.

0 포인트
yuzhang3_intel
중재자
4,476 조회수

Did you try with one simple sample, like matrix sample, you can see, the below matrix sample is run by VS in local, and the Inspector can work.

yuzhang3_intel_0-1707963703760.png

 

yuzhang3_intel_1-1707963732428.png

 

0 포인트
UmeshT
초급자
4,446 조회수

Yes, it works. I created another new console application and giving the path to this console application also works.

 

What I am struggling is to run the Intel Inspector for VSTest.Console.exe which is the command-line tool to run tests. The details on this exe is https://learn.microsoft.com/en-us/visualstudio/test/vstest-console-options?view=vs-2022 

 

I guess I am not properly giving the inputs in Application parameters in Intel Inspector project properties. Any help in this will be really helpful.

 

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug (same which have TwoOPT_TestSuite_x64.dll)

 

 

0 포인트
yuzhang3_intel
중재자
4,444 조회수

Just running application with parameters as below can work?

 

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe  /testcontainer:TwoOPT_TestSuite_x64.dll

 

From the guide you shared,  there is no need to add '/' , just needs file name, right?

vstest.console.exe myTestProject.dll

0 포인트
UmeshT
초급자
4,430 조회수

Tried the following but doesn't work.

1.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

2.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

3.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

4.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

0 포인트
yuzhang3_intel
중재자
4,429 조회수

So I think you need to confirm app + parameters can work first, and then using Inspector to run app + parameters.

0 포인트
UmeshT
초급자
4,325 조회수

Thanks for your reply. Sorry, didn't understand. app + parameters in the Application: field?

or something else.

 

The gist of the problem is that when I run console application and call the exe vstest.console.exe with parameters /testcontainer:TwoOPT_TestSuite_x64.dll, it works. 

 

But if I provide them as below to Intel Inspector, it doesn't work.

 

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug (same which have TwoOPT_TestSuite_x64.dll)

 

I will check some more documentation, meanwhile any more pointers from anyone will be helpful.

0 포인트
yuzhang3_intel
중재자
4,288 조회수

You can add "vstest.console.exe /testcontainer:TwoOPT_TestSuite_x64.dll" in one script and specify the script to execute in the application field.

0 포인트
응답