Continuous Integration

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2012 CLI not starting from Gitlab CI

Solved!
Go to solution

Hello all,

 

I hope you can help me out with this.

 

In the past I have successfully used the command line interface to run LabVIEW 2015 VIs from Gitlab CI. I now want to repeat the same for some VIs I am developing in LabVIEW 2012, but for some reason it does not work.

 

I developed a very simple Test.vi, that just opens a CLI connection, writes a single line and closes it again and set it to run, when opened. I use the Script: labview-cli --kill "C:\Test.vi"

When run the windows command line, it works fine, LabVIEW opens, the message gets send to cmd and it closes again.

However, when I run the command from Gitlab-CI, it gets stuck at the "waiting for connection on port XXXXX" step.

When I run the same step with a 2015 VI it works just fine.

 

I have installed CLI 1.4.0.7 from VIPM, which appears to be the latest in there, event hough I've read about 1.5 somewhere.

 

What else can I try?



Remember Cunningham's Law
0 Kudos
Message 1 of 8
(4,836 Views)

Hi Peter,

 

It is certainly worth trying a later version - you are right, VIPM is out of date. I'm looking to get it updated soon when I'm between projects.

 

You can find all the versions at https://github.com/JamesMc86/LabVIEW-CLI/releases. v1.5.3 is the latest stable release although v2.0.0b2 is proving pretty stable - just need to go through the motions to release it.

They fix a few different issues - not one that I can point directly to what you are describing but stability has been a big focus.

 

I will say that I build and test the library in 2011 so I don't see any reason why 2012 in particular should be a problem

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
Message 2 of 8
(4,834 Views)

Well, that was quick.

 

I will try to update the version.

I don't think there's anything wrong with the lib itself, though as it runs from my windows command line.



Remember Cunningham's Law
0 Kudos
Message 3 of 8
(4,830 Views)

OK, installing 2.0 didn't change anything.

 

It still works from the command line. A 2015 VI works from Gitlab CI.

But calling 2012 from Gitlab CI still does not.

 

Here's excerpts from my thought process so far. Potential Error sources:

Gitlab/Gitlab Runner --> Ruled out, as other projects work with labVIEW 2015 and can apparently run commands fine

Gitlab Project --> Ruled out, as it also works with LV 2015

Toolkit --> Unlikely, as it runs fine from the command line

LabVIEW 2012 installation --> It's found just fine, but maybe there's something off about it.



Remember Cunningham's Law
0 Kudos
Message 4 of 8
(4,822 Views)

So I'm not too familiar with the Gitlab runner - can you run it so you can see the user interface if you are remoted into the machine? If so does the launch all look good?

 

Sounds like it could be hanging on a dialog which this would then show up

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
Message 5 of 8
(4,820 Views)

That's no problem.

So, when I run the command from Gitlab-CI, I usually don't get any feedback on my computer. I just see the responses written to command line in my Gitlab-CI interface. This might not be normal, but I always assumed it was by design. I could be running these commands on a dev computer, where pop ups are unwanted.

When run from cmd, the VI window gets displayed. 

 

I checked, that there are no pop ups between LabVIEW startup and VI execution. I have removed all non-CLI functionality from my VIs, so I'm pretty sure they don't get called.

 

BTW, I just realized that the 2015 VIs also no longer work from Gitlab-CI. It gets one step further than 2012 though, it says "client connected". I'll look into that, now.



Remember Cunningham's Law
0 Kudos
Message 6 of 8
(4,817 Views)
Solution
Accepted by topic author PeterFoerster

Peter, do you start the runner as a service? If so, consider starting it from the autorun start menu thingie. That helps a lot with finding errors like these, as you can easily see what's happening.




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


Message 7 of 8
(4,811 Views)

OK, thanks Jörg, for your input.

 

Yesterday I managed to get my LV 2015 processes running again. However, when running Gitlab runner as a service, I still didn't get 2012 to work. Jörg's suggestion to start it as an application helped me a lot in that it a) opens the LabVIEW UI of my test steps, so I can see what's going on and b) works now. I still do not know, what causes it to not work as a service, but my problem is solved for now and I prefer to run it with the UI.

 

Just in case, someone is wondering the same thing I was yesterday: When you install the Gitlab Runner, it will create an executable in the install location and a .toml file that contains the setup of the runner (e.g. where you want to run your tests). It will also add Gitlab Runner as a startup service. When run as a service, there's no UI whatsoever.

Alternatively you can disable the Startup service in msconfig and manually start the Runner in form of a command line window, by opening a cmd at the install dir and typing: Gitlab-Runner.exe run

Or you can add a shortcut to Gitlab Runner (run as admin and with the run command included) to the startup folder and start it on boot.



Remember Cunningham's Law
0 Kudos
Message 8 of 8
(4,803 Views)