MARS test suite


* Description of tests

  Just do "make desc" in each directory.

  - You must do "make desc" in each individual test directory to print out
    a description of the test case to the console.

* Running tests

  Just do "make check" in each directory.

  - If you do "make check" in the top directory, all tests in the test
    suite will be run.

  - If you do "make check" in each <test-class> directory, all tests
    in the test class will be run.

  - If you do "make check" in each <test-class>/<test-item> directory,
    only the test item will be run.

  Options below are available:

    MARS_PREFIX=<mars-library-path>
			MARS library path to be checked.
    ARCH=<32-or-64>	Host architecture.
    MARS_SRC=<mars-source-path>
			The absolute path to the MARS source
			directory. If this option is specified, the
			library in the <mars-source-path> is checked
			instead of the installed one.

    e.g.)

        make ARCH=32 MARS_PREFIX=/opt/my-mars check

* Adding a new test

  1. Create a new directory <test-class>/<test-item>.

     # cd TFP
     # mkdir TFP_12345

  2. Create a Makefile in the directory.

     It is recommended to copy one of Makefiles in other directories.

     # cp TFP_00001/Makefile TFP_12345

  3. Create source code in C language, in the <test-item> directory.

     # cd TFP_12345
     # ls
     Makefile
     host.c
     mpu_task.c

  4. Modify the variable 'test_objs' in the Makefile, so that it
     contains object files for your new test.

     Each object must have one of the following suffixes:

       .o        host's object file
       .mpu_eo   MPU's native program
       .task_eo  MPU's MARS task

     A MARS task object file named '<name>.task_eo' can be used by the
     host program as 'extern spe_program_handle_t <name>_prog'.

     The test program (host's 'main' function) must return zero if
     succeeds, otherwise non-zero.

  5. Add definitions of <test-item> specific variables to the
     Makefile, if needed:

       timeout = <seconds> (default: 30)

  6. Add <test-item> to the variable 'test_items' in the
     <test-class>/Makefile.

---
EOF
