Execution of Leonardo ICT Test plan tasks
SPEA Leonardo integration - execution of ICT Test plan tasks
There are some situations where test coverage can be further extended by interacting with more complex functions setup as Tasks in the Leonardo ICT Test plan.
While an integrated SPEA/XJTAG project is run from within Leonardo, running Tasks such as those mentioned above is achieved by calling back into Leonardo from XJTAG.
Calling into Leonardo
XJTAG only supports calls to .NET Framework DLLs. In order to meet this requirement a wrapper .NET Framework DLL has been created called SpeaTaskRunner.dll. This gives access to the Leonardo integration DLL function lvRunAnlTaskLabel. The DLL file is currently obtainable by requesting it from XJTAG Support.
To make use of the SpeaTaskRunner DLL in XJEase it is first necessary to declare a function so XJTAG is able to locate the DLL (there is more information on calling to .NET Framework DLLs here).
In this case the required declaration is shown below:
EXTERN DOTNET RunAnlTaskLabel (STRING testFunction)(INT result) API_BINARY := "SpeaTaskRunner.dll"; API_TARGET := "SpeaTaskRunner.Main.RunAnlTaskLabel"; END;
This declaration must be located at the beginning of the Circuit Code file or Test Device file where the boundary scan test is being written, or in a suitable additional code file.
It is important to understand that the testFunction input parameter to RunAnlTaskLabel does not take Task names directly from the Leonardo project. In order to allow Tasks to be grouped, a file called CustomTest.ini is used.
CustomTest.ini
testFunction entries in CustomTest.ini contain the start and end Task labels from the Leonardo project that should be run when calling RunAnlTaskLabel.
In the example below a testFunction called TestShort is defined:
[TestShort] StartTaskLabel= SRT1 EndTaskLabel= SRT1
This example only runs one Task,, SRT1, from the Leonardo test plan. Several Tasks can be run in succession by changing the EndTaskLabel to the final Task label. The result returned when several tasks are run consecutively is the OR of the result of each individual Task.
CustomTest.ini must be stored in the same directory as the XJPack file.
Writing the XJTAG Test Function
The declared function, RunAnlTaskLabel can be called referencing any testFunction from CustomTest.ini.
The code below will test for continuity between two points (defined in the SRT1 Task in the Leonardo project). The result is used as the return value from the XJEase function, as such it will indicate if the test has passed or failed when called from the XJRunner test list:
LOCAL ShortTest()(INT result) PRINT("Testing for continuity...\n"); result := RunAnlTaskLabel("TestShort"); END;
Leonardo project setup
The only requirement within the Leonardo project is to define the relevant labels for the tasks that need to be run as callbacks from within XJTAG.
An example of a Leonardo Test plan with labels is shown below:

XJTAG v4.1.100