|
+---gateway_code: implementation of gateway_code
| |
| +---tests: unit tests
| +---integration: integration tests that require a real gateway
| +---static: default profiles, firmwares, openocd conf
|
+---roomba: roomba low level communication implementation
| (not included in the tests suites at the moment)
|
+---control_node_serial: C program talking to control node over serial
|
|
+---bin: CLI scripts and init.d script
|
|
+---tests_utils: stuff useful for tests
|
+---curl_scripts: curl test examples
Install all the gateway code
on a gateway
python setup.py release
It runs the install
command and the post_install
procedure.
Tests can be run with the following commands:
python setup.py nosetests
python setup.py lint
python setup.py pep8
They require having installed 'tests-utils/test-requirements.txt' to run
Note: unit tests require oml.mytestbed.net v2.11 installed.
# runs all tests at once
tox
# To run on gateways a 'www-data' user
tox -e integration
- launch server REST:
./server_rest.py localhost 8080
- start experiment:
curl -X POST -H "Content-Type: multipart/form-data" http://localhost:8080/exp/start/123/clochette -F "firmware=@idle.elf" -F "profile=@tata.json"; echo
- flash open node:
curl -X POST -H "Content-Type: multipart/form-data" http://localhost:8080/open/flash -F "firmware=@idle.elf"; echo