Commit 6d315783 authored by YannGarcia's avatar YannGarcia
Browse files

Add virtualization of TITAN compiler

parent 751a72c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ cd $(dirname $0)
run_dir=`pwd`

# Docker version 2
cd ./virtualization/docker
cd ./virtualization/docker-dev
./build.sh #--force-stfubuntu
#./run.sh

+78 −31
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ Alternatively, you may clone the project together with the required libraries wi

## Installation

The CISE Testing Framework project builds and tests regularly on the following platforms:
The CISE Test System builds and tests regularly on the following platforms:

  - Linux (Ubuntu)

@@ -62,10 +62,84 @@ In this case, the easiest way is to use Vagrant.


#### The host system is Linux

Vagrant requires a virtual machine. You can use either VirtualBox or WMware.
Docker does not need a virtual machine, so it is the more efficant way.


### Using TITAN compiler on a Docker image

In this configuration, TITAN compiler is located on a Docker image and the sources and the outputs are located on the host.

Pre-requisites on your host machine:
- Install Docker

Procedure on the host machine:
- Open a Terminal
- Clone the ETSI CISE Test System
- From the ETSI CISE Test System root directory, build the Docker image executing the following commands:

```sh
$ cd ./virtualization/docker
$ docker build --no-cache --tag alpine-cise -f Dockerfile --force-rm .
$ docker images
```

To build the CISE Test Suite, execute the following command:

```sh
$ ./docker-run.sh build
```

Possble other options are 'clean' to remove all the build outputs or 'rebuild' to force a build of the Test Suite after a 'clean'.

To retrieve the list of the available test cases, execute the following command:

```sh
$ ./docker-run.sh list
```

To execute the CISE Test Suite, edit and update the file etc/AtsCise.cfg and execute the following command:

```sh
$ ./docker-run.sh run
```

<b>Notes</b>:
- The CISE Test System is listening on port 30181
- Updating the file etc/AtsCise.cfg is about:
. Selecting the test(s) to be executed
. Updating value of PICs and PIXITs
. Updating HTTP port setting

### Using development Docker image

In this configuration, the TITAN compiler, the sources and the outputs are located on the Docker image.

Pre-requisites on your host machine:
- Install Docker

Procedure for a Windows host machine:
- On your host machine, open a the Docker Quickstart Terminal
- On your host machine, clone the ETSI CISE Test System. NOTE that only Docker folder and .jenkins.sh script file are required
- From the ETSI CISE Test System root directory, execute the following commands:

```sh
$ ./.jenkins.sh
...
```

NOTE The creation and the installations will take some time to achieve
- Start the container

```sh
$ ./docker/run-container.sh
...
```

- Switch to the next clause (Usage)


### Using Vagrant

Pre-requisites on your host machine:
@@ -78,7 +152,7 @@ Pre-requisites on your host machine:

Procedure:
- On your host machine, open a command line session (PuTTY, DOS window...)
- From the ETSI CISE Testing Framework project, clone the Vagrant folder
- From the ETSI CISE Test System, clone the Vagrant folder
- In the file Vagrantfile, modify the tag config.vm.provision replacing <username> & <password> strings by your ETSI credentials
- In the Vagrant folder, execute the following commands:

@@ -109,33 +183,6 @@ $ vagrant ssh
NOTE The user password is vagrant.


### Using Docker

Pre-requisites on your host machine:
- Install Virtualbox
- Install Docker

Procedure for a Windows host machine:
- On your host machine, open a the Docker Quickstart Terminal
- On your host machine, clone the ETSI CISE Testing Framework project. NOTE that only Docker folder and .jenkins.sh script file are required
- From the ETSI CISE Testing Framework project root directory, execute the following commands:

```sh
$ ./.jenkins.sh
...
```

NOTE The creation and the installations will take some time to achieve
- Start the container

```sh
$ ./docker/run-container.sh
...
```

- Switch to the next clause (Usage)


### From scratch

Pre-requisites:
@@ -199,7 +246,7 @@ Procedure:
    - Eclipse IDE for C/C++ Developers, according the procedure specified [here](https://www.eclipse.org/cdt/)
    - TITAN, according the procedure specified [here](https://github.com/eclipse/titan.core)
    - Import the TITAN plugin into your Eclipse IDE, according the procedure specified [here](https://github.com/eclipse/titan.core)
- Clone the ETSI CISE Testing Framework project into $HOME/dev folder
- Clone the ETSI CISE Test System into $HOME/dev folder

```sh
$ git clone --recurse-submodules --branch --branch stf637 https://forge.etsi.org/rep/cdm/cise-data-model ./cise-devel
@@ -267,5 +314,5 @@ $ ./run-all.bash

## How to Report a Bug

The ETSI CISE Testing Framework project is under constant development, so it is possible that you will
The ETSI CISE Test System is under constant development, so it is possible that you will
encounter a bug while using it. Please report bugs at cti_support at etsi dot org.
+2 −2
Original line number Diff line number Diff line
@@ -62,9 +62,9 @@ system.httpPort_notif.params := "HTTP(codecs=xml:xml_codec)/TCP(debug=1,server_m
#AtsCise_TestControl.control

# Check that the IUT sends a PullResponse when recieving a PullRequest with no Acknowledgement
AtsCise_TestCases.TC_CISE_xxx_BV_01
#AtsCise_TestCases.TC_CISE_xxx_BV_01
# Check that the IUT is requested to send a PullRequest with no Acknowledgement, the IUT sends a PullRequest with entry Acknowledgement set to False
#AtsCise_TestCases.TC_CISE_yyy_BV_01
AtsCise_TestCases.TC_CISE_yyy_BV_01

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
+25 −0
Original line number Diff line number Diff line
FROM stfubuntu:20.04

LABEL ETSI cise_devel
LABEL description="cise_devel Docker Image"

ENV TERM=linux \
    HOME=/home/etsi \
    HOSTNAME=docker-titan-cise_devel

COPY home /home/etsi

RUN cd /home/etsi \
    && chown -R etsi:etsi . \
    && ls ./etc/init.d/*.sh | while read S; do chmod 0750 "$S" || exit 1; done

USER etsi

RUN cd ${HOME} \
    && export PATH=$HOME/bin:$PATH \
    && ls ${HOME}/etc/init.d/*.sh | while read S; do /bin/bash -c "$S" || exit 1; done \
    && rm -fr ${HOME}/etc

CMD ["/bin/bash"]

# That's all Floks
Loading