Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit a1be4111 authored by lavocat's avatar lavocat
Browse files

Documentation to run the tests

With empty c_wrapper folder to host client and server files.
parent d6ba3161
# Installation # Installation
## Requirements Install the package yggdrasil :
First clone this repo somewhere on your computer.
Lets say `~/Documents/inria/yggdrasil` for instance.
To make things easier for you, you can update your bashrc (or whatever
equivalent) with those lines :
``` ```
export PATH=$PATH:$GOPATH/bin:~/Documents/inria/yggdrasil/python:~/Documents/inria/yggdrasil/python/isengard:~/Documents/inria/yggdrasil/python/erebor:~/Documents/inria/yggdrasil/python/task_lib git clone git@gitlab.com:lavocat/yggdrasil.git
export PYTHONPATH=$PYTHONPATH:~/Documents/inria/yggdrasil/python:~/Documents/inria/yggdrasil/python/isengard:~/Documents/inria/yggdrasil/python/erebor:~/Documents/inria/yggdrasil/python/task_lib cd yggdrasil
pip install -e .
``` ```
If you dont, it's okay, there is a special launcher able to execute the program Get the yggdrasil-c library :
without the path setup.
### Needed softwares/libraries :
* taktuk `sudo aptitude install taktuk` ```
* python3 `sudo aptitude install python3` git clone git@gitlab.com:lavocat/yggdrasil-c.git
* pyzmq `sudo aptitude install python3-zmq` cd yggdrasil-c
* pexpect `sudo aptitude install python3-pexpect` cat README
```
To build the c_wrapper Then :
* cmake 1. Follow instructions in its README to build the c_wrapper library.
* cmake-curses-gui 2. Link built client and server files to the empty c_wrapper folder
* pkg-config 3. Apply the following ssh configuration
* libczmq-dev 4. Launch tests
### SSH config file containing ## SSH config file containing
``` ```
Host A Host A
...@@ -55,7 +49,7 @@ Host F ...@@ -55,7 +49,7 @@ Host F
Replacing $USERNAME$ by your user name. Replacing $USERNAME$ by your user name.
### /etc/hosts containing ## /etc/hosts containing
``` ```
127.0.1.1 A 127.0.1.1 A
...@@ -72,21 +66,6 @@ Replacing $USERNAME$ by your user name. ...@@ -72,21 +66,6 @@ Replacing $USERNAME$ by your user name.
127.0.1.1 L 127.0.1.1 L
127.0.1.1 M 127.0.1.1 M
``` ```
### Build C examples
```
cd c_wrapper
ccmake ./
```
Type `c` to configure, make sure `BUILD_WITH_ZMQ` is ON and `ZMQ_DIR` points
where czmq is installed. Then `g` to generate.
```
make
```
### SSHD config ### SSHD config
Ensure no max session is set. Ensure no max session is set.
...@@ -98,23 +77,8 @@ script in the python folder. If not, and if you are sure of your configuration, ...@@ -98,23 +77,8 @@ script in the python folder. If not, and if you are sure of your configuration,
try to run each example one after the other to see what is wrong and consider try to run each example one after the other to see what is wrong and consider
adding an issue in the bug tracker. adding an issue in the bug tracker.
# Coding # Testing
## Pre-push hook
Please consider adding this pre-push hook in `.git/hooks/pre-push` :
``` ```
cd python
./regression.sh ./regression.sh
exit $?
``` ```
# Testing
## local testsing
Basically store your tests in the `python/tests` folder.
Launch them with the command `./launcher tests/your_test`
Once the test is good, consider adding it inside regression.sh for automatic
testing.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment