Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
This is the README for: COMPSs Tests

[Name]: COMPSs Tests
[Contact Person]: COMPSs Support <[email protected]>
[Access Level]: public
[License Agreement]: Apache2
[Platform]: COMPSs

[Body]

=== Table of Contents ===

* Description
* Dependencies
* Configuration instructions
    * Configure passwordless ssh
* Usage instructions
* Tests structure
    * Adding a new Configuration
    * Adding a new Test


== Description ==

This package contains all the test applications for the COMPSs Framework.


== Dependencies ==

To successfully execute the test suite please install the following dependenciesDescription

* Test infrastructure dependencies
    * Python2
    * Python tabulate
    * Python enum34
    * Maven
    * Java
* Tests dependencies
    * Python guppy
    * Python decorator
    * Python redis


== Configuration instructions ==

1. Please check that all the dependencies described on the "Dependencies" section are installed.

2. Configure passwordless ssh on you machine (check next subsection for further instructions)

3. Add the hosts loopbacks to the /etc/hosts. In order to do this, run the following command as root:
   $ sudo ./scripts/configure_hosts_insert

 ATTENTION: You only need to run ./configure_hosts_insert once per machine (unless someone updates it).

 You can undo this step and restore your /ets/hosts file running:
   $ sudo ./scripts/configure_hosts_remove


=== Configure passwordless ssh ===
This section shows one way to configure the passwordless access to bscgrid20.
Skip it if you already have passwordless access or you know how to do it.

You only need to execute the following commands on your local machine:
    $ cd ~/.ssh
    $ ssh-keygen -t rsa
       (press enter, enter, enter. Leave all questions empty)
    $ scp id_rsa.pub ${bscgrid20_user}@bscgrid20.bsc.es:.
       (enter your password)
    $ ssh ${bscgrid20_user}@bscgrid20.bsc.es "cat ~/id_rsa.pub >> ~/.ssh/authorized_keys; rm ~/id_rsa.pub"
       (enter your password)

You can check your access by executing the following command:
    $ ssh ${bscgrid20_user}@bscgrid20.bsc.es
       (access is granted without asking for any password)


== Usage instructions ==

The COMPSs Tests infrastructure contains many scripts but the only one that must be executed is the tests.py file. You can retrieve all its options by running:

$ cd scripts
$ python3 tests.py -h


== Tests structure ==

Next, we describe the COMPSs Tests file structure:

* ./sources : Contains the sources of the different applications.
    * ./sources/{family_name}/                                  : Contains the tests of the family
        * ./sources/{family_name}/N_{test_name}                 : ONE FOLDER per application test. The number indicates the importance of the test
            * ./sources/{family_name}/N_{test_name}/deploy      : Test deploy script
            * ./sources/{family_name}/N_{test_name}/execution   : Test execution script
            * ./sources/{family_name}/N_{test_name}/result      : Test result checker script
            * ./sources/{family_name}/N_{test_name}/pom.xml     : Maven base pom description (only for java tests)

* ./configurations                                              : Contains the configuration files for the tests execution
     ./configurations/*.cfg                                     : ONE FILE per configuration. The extension must always be ".cfg". Follow the exact same format than the example local.cfg file

* ./scripts                                                     : Contains all the scripts to run the tests suite
               !!!!!!!! DO NOT MODIFY UNLESS YOU KNOW WHAT YOU ARE DOING !!!!!!!

* ./README  : This file


=== Adding a new Configuration ===

1. Create your configuration file named whatEver.cfg by copying the default configuration file
    $ cd configurations
    $ cp local.cfg whatEver.cfg

    !!! WARN: If you do not save the cfg file under the configurations folder you will need to provide the configuration full path to the tests main script

2. Edit your configuration file

    !!! WARN: DEFINE THE EXACT SAME VARIABLES THAN THE DEFAULT local.cfg CONFIGURATION FILE
    !!! It's recommended to base your new configuration file in an already existing one (local.cfg)


=== Adding a new Test ===

1. Create your new test application folder (named newTestFolder) inside any family

2. Inside newTestFolder add all the files needed to run your application

3. MANDATORY: Add the following files inside you newTestFolder
    - deploy     : Describes all the commands needed to deploy your application
                     !In case of a C-app you need to compile it in this step and only deploy compiled files
    - execution  : Describes all the commands needed to run and check the result of your application
    - pom.xml    : [Only Java] Describes your application dependencies for maven project build

    !!! WARN: WE HIGHLY RECOMMEND TO COPY THESE FILES FROM A PREVIOUS TEST SINCE THEY ARE COMPLEX