Project

General

Profile

Template-based JUnit test cases » History » Revision 2

Revision 1 (Sergey Smolov, 01/13/2020 01:57 PM) → Revision 2/3 (Sergey Smolov, 01/15/2020 04:09 PM)

h1. Template-based JUnit test cases 

 h2. Prerequisites 

 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. 

 h2. Introduction 

 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: 
 * Assembler test program and "MicroTESK":https://forge.ispras.ru/projects/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":https://forge.ispras.ru/projects/qemu4v (simulation log file is produced); 
 * MicroTESK and QEMU4V log comparison by "Trace Matcher":https://forge.ispras.ru/projects/traceutils 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. 

 h2. Dependencies 

 The following packages should be installed in your OS: *expect*, *libjpeg62*, *gcc-powerpc-linux-gnu*. 

 h2. 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@). 

 h2. Simulator installation 

 For RISC-V test programs validation we use " *QEMU4V* ":https://forge.ispras.ru/projects/qemu4v QEMU4V emulator. QEMU4V "QEMU4V":https://forge.ispras.ru/projects/qemu4v is downloaded by project's Gradle-based build scripts in a binary form, so there is no need to install it.  

 h2. Test cases running 

 To run JUnit test cases enter the project directory and execute the following command: 
 <pre> 
 $ ./gradlew clean test 
 </pre>