Template-based JUnit test cases¶
Prerequisites¶
This instruction is suitable for those developers of MicroTESK for PowerPC project who want to run project's JUnit test cases on their own machines. The instruction is applicable for Linux-based OS only. All the package names that are mentioned here are correct for Ubuntu-based distros and may be different in other OS. For JUnit tests running you should have an access to Nexus Repository Manager server at ISP RAS network. Ask system administrator of ISP Nexus for login and password and store them at _REPO_USER
and _REPO_PASSWORD
system variables respectively.
Introduction¶
The MicroTESK for PowerPC project contains a collection of JUnit test cases. Most of them consist of the following steps:- Assembler test program and MicroTESK simulator log generation from the Ruby test template and e500mc ISA nML specifications;
- Test program compilation into binary image;
- Test program binary image simulation on QEMU4V (simulation log file is produced);
- MicroTESK and QEMU4V log comparison by Trace Matcher tool.
For all the steps of JUnit test cases to be accomplished, several auxiliary tools should be installed. For complete guide read all the chapters below.
Dependencies¶
The following packages should be installed in your OS: expect, libjpeg62, gcc-powerpc-linux-gnu.
Toolchain configuration¶
For PowerPC assembler test program compilation we use GNU toolchain. After the installation (see the step above), PPC32_TCHAIN
system variable should be assigned to a path to toolchain directory (for example, /usr
).
Simulator installation¶
For PowerPC test programs validation we use QEMU4V emulator. QEMU4V is downloaded by project's build scripts in a binary form, so there is no need to install it.
Test cases running¶
To run JUnit test cases enter the project directory and execute the following command:
$ ./gradlew clean test
Updated by Sergey Smolov over 1 year ago · 3 revisions