LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEWCLi -OperationName RunUnitTests Exit Code = 0

Is it possible for the LabVIEW CLI to exit with 0 (zero) when executing Unit Test even though one ore more of the units test fails. It is a challenge when executing a multi stage pipeline that is running on a repository. 

 

LabVIEWCLi -OperationName RunUnitTests ....

As I see it the LabVIEW CLi should only exit with a code different from zero if there is a Run Time error

0 Kudos
Message 1 of 5
(2,358 Views)

Hi,

 

I found some information in KB that will be of use.

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019TwfSAE&l=en-GB

 

At the bottom of this page:

 

"Make sure that you are following the formatting in the Predefined Command Line Operations guide for the RunVI. A few things to remember:

  • The "Command line arguments for the VI" is a string array
  • The "CLI for LabVIEW exit code that the VI returns" will return either a 0, 2 or 3 depending on the circumstances. You will choose which value to output.
  • The "Output or error information to include in the CLI for LabVIEW console or log file" is a string"

Kind regards, 

Michael

0 Kudos
Message 2 of 5
(2,322 Views)

Hi Michael

 

In this case I am not in control of the return code because I am using a predefined command RunUnitTestsSmiley Wink

The Exit code from CLI should only be different from zero if there is a run time error, as I see it.

0 Kudos
Message 3 of 5
(2,311 Views)

Hi kjeld,

You can create the custom operation as mentioned here: 

http://zone.ni.com/reference/en-XX/help/371361R-01/lvhowto/cli_creating_operations/

0 Kudos
Message 4 of 5
(2,298 Views)

Hi

 

Yes I know that the possibility is there to make a custom operation; which also can be the next step, but we would like to use as much tooling out of the box so we doesn't have maintain it.

0 Kudos
Message 5 of 5
(2,279 Views)