Template-based JUnit test cases » History » Version 2
Sergey Smolov, 01/15/2020 04:09 PM
1 | 1 | Sergey Smolov | h1. Template-based JUnit test cases |
---|---|---|---|
2 | |||
3 | h2. Prerequisites |
||
4 | |||
5 | This instruction is suitable for those developers of "MicroTESK for PowerPC":https://forge.ispras.ru/projects/microtesk-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":https://forge.ispras.ru/nexus 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. |
||
6 | |||
7 | h2. Introduction |
||
8 | |||
9 | The "MicroTESK for PowerPC":https://forge.ispras.ru/projects/microtesk-powerpc project contains a collection of JUnit test cases. Most of them consist of the following steps: |
||
10 | * Assembler test program and "MicroTESK":https://forge.ispras.ru/projects/microtesk simulator log generation from the Ruby test template and *e500mc* ISA nML specifications; |
||
11 | * Test program compilation into binary image; |
||
12 | * Test program binary image simulation on "QEMU4V":https://forge.ispras.ru/projects/qemu4v (simulation log file is produced); |
||
13 | * MicroTESK and QEMU4V log comparison by "Trace Matcher":https://forge.ispras.ru/projects/traceutils tool. |
||
14 | |||
15 | 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. |
||
16 | |||
17 | h2. Dependencies |
||
18 | |||
19 | The following packages should be installed in your OS: *expect*, *libjpeg62*, *gcc-powerpc-linux-gnu*. |
||
20 | |||
21 | h2. Toolchain configuration |
||
22 | |||
23 | 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@). |
||
24 | |||
25 | h2. Simulator installation |
||
26 | |||
27 | 2 | Sergey Smolov | For RISC-V test programs validation we use " *QEMU4V* ":https://forge.ispras.ru/projects/qemu4v emulator. QEMU4V is downloaded by project's build scripts in a binary form, so there is no need to install it. |
28 | 1 | Sergey Smolov | |
29 | h2. Test cases running |
||
30 | |||
31 | To run JUnit test cases enter the project directory and execute the following command: |
||
32 | <pre> |
||
33 | $ ./gradlew clean test |
||
34 | </pre> |