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
## Requirements
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 :
Install the package yggdrasil :
```
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
export PYTHONPATH=$PYTHONPATH:~/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
cd yggdrasil
pip install -e .
```
If you dont, it's okay, there is a special launcher able to execute the program
without the path setup.
Get the yggdrasil-c library :
### Needed softwares/libraries :
* taktuk `sudo aptitude install taktuk`
* python3 `sudo aptitude install python3`
* pyzmq `sudo aptitude install python3-zmq`
* pexpect `sudo aptitude install python3-pexpect`
```
git clone git@gitlab.com:lavocat/yggdrasil-c.git
cd yggdrasil-c
cat README
```
To build the c_wrapper
Then :
* cmake
* cmake-curses-gui
* pkg-config
* libczmq-dev
1. Follow instructions in its README to build the c_wrapper library.
2. Link built client and server files to the empty c_wrapper folder
3. Apply the following ssh configuration
4. Launch tests
### SSH config file containing
## SSH config file containing
```
Host A
......@@ -55,7 +49,7 @@ Host F
Replacing $USERNAME$ by your user name.
### /etc/hosts containing
## /etc/hosts containing
```
127.0.1.1 A
......@@ -72,21 +66,6 @@ Replacing $USERNAME$ by your user name.
127.0.1.1 L
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
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,
try to run each example one after the other to see what is wrong and consider
adding an issue in the bug tracker.
# Coding
## Pre-push hook
Please consider adding this pre-push hook in `.git/hooks/pre-push` :
# Testing
```
cd python
./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