Project

General

Profile

How To Run jUnit Tests » History » Revision 11

Revision 10 (Sergey Smolov, 02/12/2020 02:59 PM) → Revision 11/12 (Sergey Smolov, 02/12/2020 02:59 PM)

h1. How To Run jUnit Tests 

 h2. Prerequisites 

 The most preferable OS is *Linux*. We prefer Debian-based distros, like Ubuntu. 

 To run the project's jUnit tests the *gcc-mips-linux-gnu* package should be installed. Create _MIPS64_TCHAIN_ environment variable that points to a directory, that contains the _bin_ subdirectory with the toolchain components. 

 Install the packages that are mentioned in QEMU4V emulator's "Installation Guide":https://forge.ispras.ru/projects/qemu4v/wiki/Installation, because this is used in testing. 

 h2. Overview 

 The *MicroTESK for MIPS* project's "Git repository":https://forge.ispras.ru/projects/microtesk-mips64/repository contains a number of JUnit tests. The typical JUnit test contains the following sequence of stages: 

 # Template-based test program generation - the result of this stage is _<notextile>*</notextile>.s_ MIPS assembly file and a _<notextile>*</notextile>.log_ execution trace file; 
 # Test program compilation - the result of this stage is a binary ELF image of the test program; 
 # ELF image emulation on QEMU - the result of this stage is a _<notextile>*</notextile>-qemu.log_ execution trace file. 
 
  In the nearest future the one more stage will be added: 
 # Execution trace comparison - the _<notextile>*</notextile>.log_ MicroTESK trace and the _<notextile>*</notextile>-qemu.log_ QEMU4V execution traces will be compared by the "Trace Matcher":https://forge.ispras.ru/projects/traceutils tool, compared, a report will be generated. 

 To run the project tests, enter the project directory that contains the _gradlew_ script, and do the following: 
 <pre><code class="shell"> 
 ./gradlew clean test 
 </code></pre>