A compact parallel execution runtime for VIs saved in VI assembly format (.via files).
The Vireo project provides a subset of LabVIEW runtime functionality for smaller targets. Example usages are WebVIs and the EV3 support in the LabVIEW Module for LEGO® MINDSTORMS®. The LabVIEW features supported are primarily defined by the features needed for the VIA files generated by LabVIEW NXG.
When starting Vireo development it is recommended that you create a GitHub Fork and enable the CI integration in your fork. For more information see CONTRIBUTING.md.
On Windows you can fetch these utilities by installing the Chocolatey package manager and then running the following commands to install GNU Make and the GNU core utilities:
choco install make
choco install gnuwin32-coreutils.portable
For other platforms see platform documentation for installing a compatible version of GNU make and GNU core utilities.
On all platforms run the following in the VireoSDK folder to install JavaScript-based tooling needed for the test infrastructure:
npm install
- emsdk toolchain (see following)
The emsdk toolchain is used to cross-compile Vireo to Vireo.js to run in Node.js and Browser environments.
-
Create a directory outside of the VireoSDK folder to store the emsdk toolchain binaries
-
Do one of the following:
- download and extract the latest emsdk zip distribution
- or clone the juj/emsdk GitHub repository
-
If you download the zip archive you will need to run the following command inside the extracted folder to bring it up to date:
emsdk update
-
From either the extracted folder or the cloned emsdk repo run the following commands:
emsdk install sdk-1.37.36-64bit emsdk activate sdk-1.37.36-64bit emcc -v # should say emcc version 1.37.36
NOTE: The above commands only add emcc to the path for your current shell session. The emsdk tool provides the emsdk activate SOME_SDK_VERSION --global
option but there is a known issue where using the --global
flag hangs on Windows.
Instead it is recommended that in a new shell where you wish to build Vireo you run the emsdk_env.bat
(Windows) or emsdk_env.sh
(Mac / Linux) from the emsdk folder to update your path variables for the shell session.
For more detailed information about the emsdk tooling see juj/emsdk GitHub repository.
To create a default (release) build of vireo.js:
make js
The above default build of vireo.js is equivalent to:
make js BUILD=release
To create a debug build of vireo.js:
make js BUILD=debug
To create a profile build of vireo.js:
make js BUILD=profile
Notice that vireo.js is created in the dist
folder based on the BUILD
type. For example, a default vireo.js build equivalent to BUILD=release
will be located at: dist/asmjs-unknown-emscripten/release/vireo.js
- Visual Studio 2013 or Visual Studio 2015 with C++ support
- Open the
Vireo_VS/VireoCommandLine.sln
solution in Vireo Studio - Perform a Debug build
Notice the esh executeable placed in the dist
folder.
- GCC 4.9
From the root directory run the following:
make native
Notice the esh executeable placed in the dist
folder.
- XCode
Open the Vireo_Xcode/VireoEggShell.xcodeproj
The VTR test suite runs .via files located in the test-it/ViaTests
directory, captures the Standard I/O during the execution, and compares it to the .vtr output file located in test-it/ExpectedResults
. The VTR test suite is the primary test suite for testing execution behavior for Vireo.
To run all the native and Node.js vtr tests:
make test
To run all the native vtr tests:
make testnative
To run all the Node.js vtr tests:
make testjs
To run all the native and Node.js vtr tests:
node ./test.js
To run all the native vtr tests:
node ./test.js -n
To run all the Node.js vtr tests:
node ./test.js -j
To run a specific test suite:
node ./test.js -t <test suite>
To run individual tests:
node ./test.js HelloWorld.via
Since the test suites can be created recursively from other test suites in the configuration file, the -l
command line argument will list out all of the tests to be run with the test suite name provided. Example:
node ./test.js -l native
Will list out all of the tests that would be run against the native
test suite.
$ node ./test.js -h
Usage: node ./test.js [options] [via test files]
Options:
-n Run the tests against the native vireo target (esh)
-j Run the tests against the JavaScript target (vireo.js)
-t [test suite] Run the tests in the given test suite
-l [test suite] List the tests that would be run in given test suite,
or list the test suite options if not provided
-e Execute the test suite or tests provided and show their
raw output; do not compute pass/fail
-h Print this usage message
--once Will only run the tests once (default is to run twice)
The karma test suite is a Browser only test suite used to test the JS public API for Vireo along with the portion of Vireo features that are JS specific (ie the actual HTTP communication layer of the HTTP Client feature). The karma test suite also runs the VTR test suite as part of the execution.
To run the full karma test suite:
npm run test
Vireo tests rely on a locally running instance of the httpbin server for testing the HTTP Client functionality. If the httpbin server is not running locally, the test suite will skip tests that rely on it. If you would like to run the HTTP client tests locally these instructions show you how to do so.
- Python 2.7.9 or later (primarily for pip availability)
- Pip package manager
- Ensure that python (correct version) and pip are available on the path
- From a command line in the VireoSDK directory or elsewhere do
pip install tox
to globally install the tox tool
-
Open a command prompt in the VireoSDK directory
-
Run the
npm run httpbin
command. This will install dependencies of httpbin if necessary and start the httpbin server locally.Note: On Windows you can alternatively execute
npm run httpbin-start
to start the httpbin server in a new console window. -
With the server running in a new window now you can run the tests that rely on the HTTP client:
- Running HTTP karma tests
npm run test
- Running HTTP VTR tests
make testhttpbin
The .via
test files are put in the test-it/ViaTests
folder and the results from the stdout of the test .via
file from vireo is put in a file of the same name inside the test-it/ExpectedResults/
folder. The test name is then added to a test suite within the testList.json
file in the test-it
directory.
The testList.json
file has two properties that are required for each test suite name:
This is an array of strings that are names to other test suites. These test suite names are processed recursively to add the other tests together into one list of tests to run. (Duplicates are omitted if overlaps exists between tests)
This is an array of strings that contain the list of .via
files that the test suite should run.
This will be a simple example that will add the test suite rpi
with the RpiTest.via
file to the test manager.
- Put the
RpiTest.via
in thetest-it/ViaTests
folder and put theRpiTest.vtr
file in thetest-it/ExpectedResults
folder. - Then add this example code to the
testList.json
file:
"rpi": {
"include": [ "common" ],
"tests": [
"RpiTest.via"
]
}
This will add a test suite rpi
that will include the test RpiTest.via
and all of the tests included in the common
test suite.
- Try it out to verify it all works and your tests pass:
node ./test.js -n -t rpi
We are using the Doxygen tool to generate our documentation. This tool allows to annotate our source code and generate documentation from it. We are currently using version 1.8.6.
Installers can be found here. On Windows use the 64-bit version.
Once Doxygen is installed run the following command from any directory in the repo
npm run doxygen
It will find and use the Doxyfile file in the source directory and will generate the documentation files in the following directory
gh-pages
The main html file in the gh-pages
is called: index.html
Features beyond that core set, that can be accessed directly from VIA source written by hand, should be considered experimental, and subject to change at any time. A complete list of disclaimers and terms is described in LICENSE.txt