¿Buscando una versión en Español?
Available Commands
-
clearlvcache - A G-CLI tool for clearing the LabVIEW Cache.
-
vipc - A G-CLI tool for applying VIPC files.
-
lvbuildspec - A G-CLI tool for building LabVIEW build specifications.
-
vitester - A G-CLI tool for running VI Tester Tests
-
lunit - A G-CLI tool for running LUnit Tests.
-
vipb - A G-CLI tool for building VIPM packages from .vipb build specifications.
-
vip - A G-CLI tool for installing VIPM packages.
-
switcheroo - A G-CLI tool for switching out source libraries to test PPLs and VIPM packages.
clearlvcache
Description
This tool clears both the AppBuilder and CompiledObject Caches. I generally use this as one of the first steps in a job, especially if you are running your job in a VM as opposed to a Docker image. It may not be as useful for jobs running in Docker, since presumably each run of the job starts with a fresh slate by spinning up a new container.
NOTE: in G-CLI version 3.0+ this can be replaced with the built in ClearCache command.
Options
This G-CLI Tool has no options. You just call it directly from G-CLI.
Example
# G-CLI options ignored for simplicity.
# it is really this simple.
g-cli clearlvcache
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/clearlvcache
vipc
Description
This tool allows you to apply a VI Package Configuration file (vipc) using G-CLI. You point to the vipc file and the version of LabVIEW and this tool will check to see if it needs applied and apply it if necessary.
Options
This G-CLI Tool has the following options:
| flag | parameters | required | description |
|---|---|---|---|
| --lv-version, -v | LabVIEW Version | no | LabVIEW version to install VIPC to. Defaults to internal version of VIPC file. If 64 bit LabVIEW you must specify. Example 22.3 (64-bit). |
| --timeout, -t | VIPM API timeout | no | time to wait for VIPM API timeout. Defaults to 300s |
Example
# G-CLI options ignored for simplicity.
# -- seperates the g-cli options from the options for this specific tool.
g-cli vipc -- -v "22.3 (64-bit)" myvipcfile.vipc # Applies myvipcfile.vipc to LabVIEW 22Q3 64 bit
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/vipc
lvbuildspec
Description
This tool allows you to build LabVIEW build specifications using G-CLI. You can manually supply a build number or use LabVIEW's built-in autoincrement functionality.
Options
This G-CLI Tool has the following options:
| flag | parameters | required | description |
|---|---|---|---|
| --project, --proj, -p | project path | yes | Project containing build specification. |
| --buildspec, -b | build spec to build | yes | Specific build specification to build. |
| --target, -t | target to build for | no | Target that contains build specification. Defaults to MyComputer. |
| --version, -v | version | no | Version number x.x.x.x to assign to build. If left empty just uses whatever is currently set in the LabVIEW Project. --manualversion and -mv also work for backwards compatibility, but are deprecated and will eventually be removed. |
| --no-clean, -nc | no clean | no | Skips cleaning - use this for Installers to avoid LabVIEW bug where cleaning installer removes exes and then installer build fails. |
Example
# G-CLI options ignored for simplicity.
# -- seperates the g-cli options from the options for this specific tool.
g-cli lvbuildspec -- -p myproject.lvproj -b myexe -v 1.2.3.4 # builds my exe with version number set to 1.2.3.4
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/lvbuildspec
vitester
Description
This tool runs a set of vitester tests and generates a JUnit report file.
Options
This G-CLI Tool has the following options:
| flag | parameters | required | description |
|---|---|---|---|
| --report, -r | report path | yes | Path to write JUnit report to. |
Example
# G-CLI options ignored for simplicity.
# it is really this simple.
g-cli vitester -- -r UnitTestReport.xml myproject.lvproj # this points to a project, you can also point to a Test Case or Test Suite Class
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/vitester
lunit
Description
This tool allows you to run LUnit tests from the CLI using G CLI.
Options
This G-CLI Tool has the following options:
| flag | parameters | required | description |
|---|---|---|---|
| --report, -r, | report path | yes | Path to the report |
| --parallel | parallel | no | Flag to run tests in parallel |
Trailing Arguments are interpreted as paths. Typically this is the LabVIEW project you want to scon for tests to run.
Example
# G-CLI options ignored for simplicity.
# -- seperates the g-cli options from the options for this specific tool.
g-cli lunit -- -r UnitTestReport.xml mylabviewproject.lvproj # Runs alll lunit tests found in mylabviewproject.lvproj
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/lunit
vipb
Description
This tool allows you to build VIPM Packages from the CLI using G CLI.
Options
This G-CLI Tool has the following options:
| flag | parameters | required | description |
|---|---|---|---|
| --buildspec, -b, | build spec | yes | Path to the vipb file to build |
| --version, -v | version | no | Version to build |
| --release-notes, -r | release notes file | no | Path to a file containing the release notes |
| --timeout, -t | timeout | no | Timeout in seconds defaults to 1200 = 20 minutes |
Example
# G-CLI options ignored for simplicity.
# -- seperates the g-cli options from the options for this specific tool.
g-cli vipb -- -b MyBuildspec.vipb -v 1.2.3.4 # builds version 1.2.3.4
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/vipb
vip
Description
This tool allows you to install an individual VIP file from the CLI using G CLI. This is useful for installing packages for testing after you build them. For general dependency management use the vipc tool
Options
This G-CLI Tool has the following options:
| flag | parameters | required | description |
|---|---|---|---|
| --local-vip-file | package to install | no | Install specific package file |
| --timeout, -t | VIPM API timeout | no | Timeout in seconds defaults to 1200 = 20 minutes |
| --lv-version, -lv | LabVIEW Version | yes | LabVIEW version to install VIPC to |
| --list | list | no | Lists all available LabVIEW versions |
| --list_packages | list_packages | no | Lists all available and installed packages for a particular LabVIEW version |
Example
# G-CLI options ignored for simplicity.
# -- seperates the g-cli options from the options for this specific tool.
g-cli vip -- --lv-version "20.0 (64-bit)" --local-vip-file "path_to_my_package.vip" # installs my package from the vip file.
# to view LV versions
g-cli vip -- --list
# to view installed and available packages
g-cli vip -- --list_packages --lv-version "20.0 (64-bit)"
# to install a specific package from VIPM (ie not a local file)
g-cli vip -- --lv-version "20.0 (64-bit)" "name_of_package-1.1.1.1"
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/vip
switcheroo
Description
A G-CLI tool for switching source libraries to PPLs and installed VIPM packages for testing. Allows you to write tests once for the source and then reuse those tests against the built/installed library.
Options
This G-CLI Tool has the following options:
| flag | parameters | required | description |
|---|---|---|---|
| --test-dir, -t | test directory | yes | Directory of Tests to load - these are the callers of the library you are going to replace. |
| --original, -o | original library | yes | Library to be replaced |
| --replacement, -r | replacement library | yes | Original Library will be replaced with this. |
NOTE: for original and replacement you can use <vilib> which will get replaced with the path to vilib.
Example
# G-CLI options ignored for simplicity.
# -- seperates the g-cli options from the options for this specific tool.
g-cli switcheroo -- -t "tests" -o "mylib.lvlib" -r "mylib.lvlibp"
or
g-cli switcheroo -- -t "tests" -o "mylib.lvib" -r "<vilib>/myrenamedlib.lvlib"
Repository
For more information and to see the source code, check out the repository here: https://gitlab.com/sas-gcli-tools/switcheroo
Third Party CLI Tools for other common commands
These are tools I didn't bother to implement G-CLI commands for, since they are already provided. You may find these useful. I'm not going to document them here, since the developers have already done that.