Template-based JUnit test cases¶
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_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.
The following packages should be installed in your OS: expect, libjpeg62, gcc-powerpc-linux-gnu.
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,
For RISC-V 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