Commit 07197a26 authored by Federico Sismondi's avatar Federico Sismondi

Merge branch 'develop' into 'master'

Develop

See merge request !117
parents 1c4cc0c9 723e027b
=========================
Contributing to ioppytest
=========================
====================================================
Thank you for considering contributing to ioppytest!
====================================================
List of devs and network testers that contributed to the tool:
==============================================================
Federico Sismondi (fsismondi)
Constant (cdx)
Benjamin (btu)
Erwan Le Flem (BhzErlb)
Ghada Gharbi (ggharbi)
Mahdi Ben Alaya (mbenalaya)
Nicolas Le Gall
Thijs Walcarius
Pauline Gaudet-Chardonnet
Miguel Angel Reina
ETSI CTI
Thank you for considering contributing to ttproto!
.. contents:: Table of content
Git workflow - Merge request guidelines
=======================================
......@@ -25,16 +37,6 @@ request is as follows:
.. [#] Push the commit(s) to your fork
.. [#] Submit a merge request (MR) to the master branch / develop branch (depending if it's a fix or new feature)
Some other comments:
.. [#] The MR title should describe the change you want to make
.. [#] The MR description should give a motive for your change and the method you used to achieve it.
.. [#] If you are proposing core/substantial changes to the tools please create an issue first to discuss it beforehand.
.. [#] Mention the issue(s) your merge request solves, using the Solves #XXX or Closes #XXX syntax.
.. [#] Please keep the change in a single MR as small as possible.
.. [#] For examples of feedback on merge requests please look at already closed merge requests.
.. [#] Merging will be done by main maintainer after reviewing the changes.
When having your code reviewed and when reviewing merge requests please take the
code review guidelines into account.
This diff is collapsed.
......@@ -42,9 +42,12 @@ LIST = automated_iut-coap_client-coapthon \
testing_tool-interoperability-lwm2m \
reference_iut-coap_server \
reference_iut-coap_client \
automated_iut-onem2m_adn \
automated_iut-onem2m_server-eclipse_om2m \
automated_iut-lwm2m_server-leshan \
automated_iut-lwm2m_client-leshan \
info:
@echo $(info_message)
......@@ -81,6 +84,7 @@ build-tools: ## builds all testing tool docker images (only testing tool)
$(MAKE) _docker-build-onem2m
$(MAKE) _docker-build-lwm2m
$(MAKE) _docker-build-comi
$(MAKE) _docker-build-wot
build-automated-iuts: ## Build all automated-iut docker images
@echo "Starting to build docker images.. "
......@@ -88,6 +92,7 @@ build-automated-iuts: ## Build all automated-iut docker images
$(MAKE) _docker-build-comi-additional-resources
$(MAKE) _docker-build-onem2m-additional-resources
$(MAKE) _docker-build-lwm2m-additional-resources
$(MAKE) _docker-build-wot-additional-resources
build-all: ## Build all testing tool in docker images, and other docker image resources too
@echo $(info_message)
......@@ -215,7 +220,6 @@ install-python-dependencies: ## installs all py2 and py3 pip dependencies
@python -m pip -qq install ioppytest-agent
@echo "installing py3 submodule's dependencies..."
@python3 -m pip -qq install pytest
@python3 -m pip -qq install ioppytest-utils
@echo "installing py3 ioppytest's dependencies..."
......@@ -245,6 +249,16 @@ _docker-build-lwm2m:
# tag all last version images also with a version-less name
docker tag testing_tool-interoperability-lwm2m-v$(version):latest testing_tool-interoperability-lwm2m
_docker-build-wot:
@echo "Starting to build the wot testing tools.."
# let's build the testing tool image (same for interop and conformance)
docker build --quiet -t testing_tool-interoperability-wot-v$(version) -f envs/wot_testing_tool/Dockerfile .
# tag all last version images also with a version-less name
docker tag testing_tool-interoperability-wot-v$(version):latest testing_tool-interoperability-wot
_docker-build-onem2m:
@echo "Starting to build the oneM2M testing tools.."
......@@ -317,9 +331,9 @@ _docker-build-coap-additional-resources:
docker build --quiet -t automated_iut-coap_client-libcoap-v$(version) -f automation/coap_client_libcoap/Dockerfile .
docker tag automated_iut-coap_client-libcoap-v$(version):latest automated_iut-coap_client-libcoap
# automated_iut-coap_server-august_cellars (WIP)
docker build --quiet -t automated_iut-coap_server-august_cellars-v$(version) -f automation/coap_server_august_cellars/Dockerfile .
docker tag automated_iut-coap_server-august_cellars-v$(version):latest automated_iut-coap_server-august_cellars
# # automated_iut-coap_server-august_cellars (WIP)
# docker build --quiet -t automated_iut-coap_server-august_cellars-v$(version) -f automation/coap_server_august_cellars/Dockerfile .
# docker tag automated_iut-coap_server-august_cellars-v$(version):latest automated_iut-coap_server-august_cellars
_docker-build-lwm2m-additional-resources:
@echo "Starting to build lwm2m-additional-resources.. "
......@@ -329,9 +343,22 @@ _docker-build-lwm2m-additional-resources:
docker tag automated_iut-lwm2m_client-leshan-v$(version):latest automated_iut-lwm2m_client-leshan
docker tag automated_iut-lwm2m_server-leshan-v$(version):latest automated_iut-lwm2m_server-leshan
_docker-build-wot-additional-resources:
@echo "Starting to build wot-additional-resources.. "
docker build --quiet -t automated_iut-wot_arenahub-v$(version) -f automation/wot_arenahub/Dockerfile .
docker build --quiet -t automated_iut-wot_thingweb-v$(version) -f automation/wot_thingweb/Dockerfile .
docker tag automated_iut-wot_arenahub-v$(version):latest automated_iut-wot_arenahub
docker tag automated_iut-wot_thingweb-v$(version):latest automated_iut-wot_thingweb
_docker-build-onem2m-additional-resources:
@echo "Starting to build onem2m-additional-resources.. "
@echo "TBD"
docker build --quiet -t automated_iut-onem2m_server-eclipse_om2m-v$(version) -f automation/onem2m_cse_eclipse_om2m/Dockerfile .
docker tag automated_iut-onem2m_server-eclipse_om2m-v$(version):latest automated_iut-onem2m_server-eclipse_om2m
docker build --quiet -t automated_iut-onem2m_adn-v$(version) -f automation/onem2m_adn_etsi_implementation/Dockerfile .
docker tag automated_iut-onem2m_adn-v$(version):latest automated_iut-onem2m_adn
_docker-build-comi-additional-resources:
@echo "Starting to build comi-additional-resources.. "
......@@ -379,6 +406,13 @@ _run-coap-mini-interop-libcoap-cli-vs-august-cellars-server:
docker run -d --rm --env AMQP_EXCHANGE=$(AMQP_EXCHANGE) --env AMQP_URL=$(AMQP_URL) --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged --name automated_iut-coap_client-libcoap automated_iut-coap_client-libcoap
docker run -d --rm --env AMQP_EXCHANGE=$(AMQP_EXCHANGE) --env AMQP_URL=$(AMQP_URL) --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged --name automated_iut-coap_server-august_cellars automated_iut-coap_server-august_cellars
_run-coap-mini-interop-aiocoap-cli-vs-august_cellars-server:
@echo "Using AMQP env vars: {url : $(AMQP_URL), exchange : $(AMQP_EXCHANGE)}"
@echo "running $@"
$(MAKE) run-coap-testing-tool
docker run -d --rm --env AMQP_EXCHANGE=$(AMQP_EXCHANGE) --env AMQP_URL=$(AMQP_URL) --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged --name automated_iut-coap_client-aiocoap automated_iut-coap_client-aiocoap
docker run -d --rm --env AMQP_EXCHANGE=$(AMQP_EXCHANGE) --env AMQP_URL=$(AMQP_URL) --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged --name automated_iut-coap_server-august_cellars automated_iut-coap_server-august_cellars
_run-coap-mini-interop-aiocoap-cli-vs-coapthon-server:
@echo "Using AMQP env vars: {url : $(AMQP_URL), exchange : $(AMQP_EXCHANGE)}"
@echo "running $@"
......@@ -414,9 +448,21 @@ _run-lwm2m-mini-interop-leshan-cli-vs-leshan-server:
@echo "Using AMQP env vars: {url : $(AMQP_URL), exchange : $(AMQP_EXCHANGE)}"
@echo "running $@"
$(MAKE) run-lwm2m-testing-tool
$(MAKE) _setup-coap-mini-interop-leshan-cli-vs-leshan-server
$(MAKE) _setup-lwm2m-mini-interop-leshan-cli-vs-leshan-server
_run-onem2m-mini-interop-etsi-adn-vs-eclipse-cse:
@echo "Using AMQP env vars: {url : $(AMQP_URL), exchange : $(AMQP_EXCHANGE)}"
@echo "running $@"
$(MAKE) run-onem2m-testing-tool
$(MAKE) _setup-onem2m-mini-interop-etsi-adn-vs-eclipse-cse
_setup-onem2m-mini-interop-etsi-adn-vs-eclipse-cse:
@echo "Using AMQP env vars: {url : $(AMQP_URL), exchange : $(AMQP_EXCHANGE)}"
@echo "running $@"
docker run -d --rm --env AMQP_EXCHANGE=$(AMQP_EXCHANGE) --env AMQP_URL=$(AMQP_URL) --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged --name automated_iut-onem2m_adn automated_iut-onem2m_adn
docker run -d --rm --env AMQP_EXCHANGE=$(AMQP_EXCHANGE) --env AMQP_URL=$(AMQP_URL) --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged --name automated_iut-onem2m_server-eclipse_om2m automated_iut-onem2m_server-eclipse_om2m
_setup-coap-mini-interop-leshan-cli-vs-leshan-server:
_setup-lwm2m-mini-interop-leshan-cli-vs-leshan-server:
@echo "Using AMQP env vars: {url : $(AMQP_URL), exchange : $(AMQP_EXCHANGE)}"
@echo "running $@"
docker run -d --rm --env AMQP_EXCHANGE=$(AMQP_EXCHANGE) --env AMQP_URL=$(AMQP_URL) --sysctl net.ipv6.conf.all.disable_ipv6=0 --privileged --name automated_iut-lwm2m_client-leshan automated_iut-lwm2m_client-leshan
......
This diff is collapsed.
- name: "aiocoap-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-aiocoap-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-aiocoap-cli-vs-californium-server"
target_stop: "stop-all"
delim: "aiocoap-cli-vs-californium-server"
- name: "libcoap-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-libcoap-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-libcoap-cli-vs-californium-server"
target_stop: "stop-all"
delim: "libcoap-cli-vs-californium-server"
- name: "californium-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-californium-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-californium-cli-vs-californium-server"
target_stop: "stop-all"
delim: "californium-cli-vs-californium-server"
- name: "coapthon-cli-vs-californium-server"
target_start: "_setup-coap-mini-interop-coapthon-cli-vs-californium-server"
target_start: "_run-coap-mini-interop-coapthon-cli-vs-californium-server"
target_stop: "stop-all"
delim: "coapthon-cli-vs-californium-server"
- name: "californium-cli-vs-coapthon-server"
target_start: "_setup-coap-mini-interop-californium-cli-vs-coapthon-server"
target_start: "_run-coap-mini-interop-californium-cli-vs-coapthon-server"
target_stop: "stop-all"
delim: "californium-cli-vs-coapthon-server"
- name: "coapthon-cli-vs-coapthon-server"
target_start: "_setup-coap-mini-interop-coapthon-cli-vs-coapthon-server"
target_start: "_run-coap-mini-interop-coapthon-cli-vs-coapthon-server"
target_stop: "stop-all"
delim: "coapthon-cli-vs-coapthon-server"
This diff is collapsed.
This diff is collapsed.
......@@ -299,7 +299,7 @@ class AutomatedIUT(threading.Thread):
def handle_test_suite_report(self, event):
self.log('Got final test suite report')
if self.process_log_file:
contents = open(self.process_log_file).read()
contents = open(self.process_log_file, "r", encoding="utf-8").read()
self.log('*' * 72)
self.log('AUTOMATED_IUT LOGS %s' % self.process_log_file)
self.log('*' * 72)
......
......@@ -27,12 +27,13 @@ WORKDIR /ioppytest
RUN python -m pip install ioppytest-agent
RUN python3 -m pip install ioppytest-utils
#py3 requirements
RUN python3 -m pip install -r automation/coap_client_aiocoap/requirements.txt
# requirements on automated-iut python code
RUN python3 -m pip install -r automation/requirements.txt
#RUN cp automation/coap_client_aiocoap/supervisor.conf supervisor.conf
# install aiocoap from PyPI
RUN python3 -m pip install aiocoap
EXPOSE 5671 5672
#RUN cp automation/coap_client_aiocoap/supervisor.conf supervisor.conf
# launch processes
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "automation/coap_client_aiocoap/supervisor.conf"]
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......
......@@ -33,13 +33,7 @@ WORKDIR /ioppytest
# requirements on automated-iut python code
RUN python3 -m pip install -r automation/requirements.txt
## temp PATCH for avoiding https://github.com/celery/py-amqp/issues/191
#RUN python3 -m pip install -Iv amqp==2.3.1
#RUN python -m pip install -Iv amqp==2.3.1
#RUN cp automation/coap_client_californium/supervisor.conf /etc/supervisor/supervisor.conf
EXPOSE 5671 5672
# launch processes
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "automation/coap_client_californium/supervisor.conf"]
\ No newline at end of file
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......@@ -40,6 +42,17 @@ stderr_logfile_maxbytes=0
;stdout_logfile_maxbytes = 10MB
;stdout_logfile_backups = 5
[program:automated-iut-extra-ipv6-routes-config]
command = sh -c "sleep 10;ip -6 route add cccc::/64 dev tun0"
autorestart=false
stopsignal=INT
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:automated-iut]
command = sh -c "sleep 6;/usr/bin/python3 -m automation.coap_client_californium.automated_iut"
autorestart=false
......
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......
FROM ubuntu:17.10
FROM debian:stretch
MAINTAINER federico.sismondi@inria.fr
ENV DEBIAN_FRONTEND noninteractive
......@@ -50,15 +50,11 @@ RUN git clone https://github.com/obgm/libcoap.git
WORKDIR /ioppytest/automation/coap_client_libcoap/libcoap/libcoap
RUN ./autogen.sh
RUN ./configure --enable-examples --disable-doxygen --disable-manpages
RUN ./configure --enable-examples --disable-doxygen --disable-manpages --disable-dtls
RUN make
RUN make install
ENV PATH="/ioppytest/automation/coap_client_libcoap/libcoap/libcoap/examples:$PATH"
## temp PATCH for avoiding https://github.com/celery/py-amqp/issues/191
#RUN python3 -m pip install -Iv amqp==2.3.1
#RUN python -m pip install -Iv amqp==2.3.1
WORKDIR /ioppytest
# launch processes
......
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......@@ -40,6 +42,17 @@ stderr_logfile_maxbytes=0
;stdout_logfile_maxbytes = 10MB
;stdout_logfile_backups = 5
[program:automated-iut-extra-ipv6-routes-config]
command = sh -c "sleep 10;ip -6 route add cccc::/64 dev tun0"
autorestart=false
stopsignal=INT
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:automated-iut]
command = sh -c "sleep 6;/usr/bin/python3 -m automation.coap_client_libcoap.automated_iut"
autorestart=false
......
......@@ -50,8 +50,5 @@ RUN msbuild /p:Configuration=Debug TestServer.Net462.sln
# run implementation
#ENTRYPOINT mono /AugustCellarsTestServer/TestServer/bin/Debug/TestServer.exe --ipaddress=127.0.0.1 --interop-test=CoapCore
# temp PATCH for avoiding https://github.com/celery/py-amqp/issues/191
RUN python -m pip install -Iv amqp==2.3.1
# launch processes
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "/ioppytest/automation/coap_server_august_cellars/supervisor.docker.ini"]
\ No newline at end of file
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=false
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......@@ -40,6 +42,10 @@ stderr_logfile_maxbytes=0
;stdout_logfile_maxbytes = 10MB
;stdout_logfile_backups = 5
; supervisord has a different restart mechanism for when the process is starting
; up (the process is in the STARTING state). Retries during process startup are
; controlled by startsecs and startretries.
[program:automated-iut]
directory= /ioppytest
command = sh -c "sleep 9;/usr/bin/python3 -m automation.coap_server_august_cellars.automated_iut"
......
......@@ -33,11 +33,5 @@ WORKDIR /ioppytest
# requirements on automated-iut python code
RUN python3 -m pip install -r automation/requirements.txt
## temp PATCH for avoiding https://github.com/celery/py-amqp/issues/191
#RUN python3 -m pip install -Iv amqp==2.3.1
#RUN python -m pip install -Iv amqp==2.3.1
EXPOSE 5671 5672
# launch processes
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "automation/coap_server_californium/supervisor.conf"]
\ No newline at end of file
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......
......@@ -37,9 +37,5 @@ RUN git clone https://github.com/fsismondi/CoAPthon.git automation/coap_server_c
#py3 IUT requirements
RUN python3 -m pip install -r automation/coap_server_coapthon/CoAPthon/requirements.txt
## temp PATCH for avoiding https://github.com/celery/py-amqp/issues/191
#RUN python3 -m pip install -Iv amqp==2.3.1
#RUN python -m pip install -Iv amqp==2.3.1
# launch processes
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "automation/coap_server_coapthon/supervisor.conf"]
\ No newline at end of file
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......
......@@ -34,10 +34,6 @@ RUN python3 -m pip install -r automation/requirements.txt
#ADD automation/comi_server_acklio/serverComi /CoMI/
#ADD automation/comi_server_acklio/examples /CoMI/examples/
## temp PATCH for avoiding https://github.com/celery/py-amqp/issues/191
#RUN python3 -m pip install -Iv amqp==2.3.1
#RUN python -m pip install -Iv amqp==2.3.1
# launch processes
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "automation/comi_client_acklio/supervisor.conf.ini"]
......
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......
......@@ -35,10 +35,6 @@ ADD automation/comi_server_acklio/serverComi /CoMI/
RUN chmod +x /CoMI/serverComi
ADD automation/comi_server_acklio/interop /CoMI/interop/
## temp PATCH for avoiding https://github.com/celery/py-amqp/issues/191
#RUN python3 -m pip install -Iv amqp==2.3.1
#RUN python -m pip install -Iv amqp==2.3.1
# launch processes
CMD ["/usr/bin/supervisord", "--nodaemon", "--configuration", "automation/comi_server_acklio/supervisor.conf.ini"]
......
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......
......@@ -19,7 +19,6 @@ class LwM2MClient(AutomatedIUT):
component_id = 'automated_iut-lwm2m_client_leshan'
node = 'lwm2m_client'
process_log_file = os.path.join(TMPDIR, component_id + '.log')
implemented_testcases_list = [] # special case: all test cases can be executed by IUT
iut_cmd = [
......
......@@ -28,7 +28,9 @@ command = ioppytest-agent connect
user=root
stopsignal=INT
stopasgroup=true
autorestart=false
autorestart=true
startretries=3
startsecs=5
loglevel=debug
; for sending logs to docker
stdout_logfile=/dev/stdout
......
......@@ -25,9 +25,12 @@ RUN python3 -m pip install --upgrade pip
RUN apt-get -y install default-jre
#requirement for leshan server trigger
RUN apt-get -y install nodejs
RUN apt-get -y install npm
RUN apt-get update -yq \
&& apt-get install curl gnupg -yq \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash \
&& apt-get install nodejs -yq
RUN npm install body-parser
RUN npm install request
ADD . /ioppytest
ENV PATH="/ioppytest:$PATH"
......
......@@ -11,6 +11,7 @@ logger.setLevel(LOG_LEVEL)
lwm2m_client_ip_prefix, lwm2m_client_ip_host = TestSuite(TD_LWM2M, TD_LWM2M_CFG).get_node_address('lwm2m_client')
lwm2m_server_ip_prefix, lwm2m_server_ip_host = TestSuite(TD_LWM2M, TD_LWM2M_CFG).get_node_address('lwm2m_server')
class LeshanServerTrigger(AutomatedIUT):
"""
Leshan Server trigger expects:
......@@ -20,27 +21,29 @@ class LeshanServerTrigger(AutomatedIUT):
component_id = 'automated_iut-lwm2m_server-leshan'
node = 'lwm2m_server'
iut_base_cmd = 'nodejs automation/lwm2m_server_leshan/trigger.js'
implemented_testcases_list = [] # special case: all test cases can be executed by IUT
def __init__(self):
logging.info('init .. %s [ %s ]' % (self.node, self.component_id))
super().__init__(self.node)
logger.info('starting %s [ %s ]' % (self.node, self.component_id))
logging.info('init finished.. %s [ %s ]' % (self.node, self.component_id))
def _execute_verify(self, verify_step_id):
logger.warning('Ignoring: %s. No auto-iut mechanism for verify step implemented.' % verify_step_id)
logging.warning('Ignoring: %s. No auto-iut mechanism for verify step implemented.' % verify_step_id)
def _execute_stimuli(self, stimuli_step_id, addr):
logger.info('got stimuli execute request: \n\tSTIMULI_ID=%s,\n\tTARGET_ADDRESS=%s' % (stimuli_step_id, addr))
logging.info('got stimuli execute request: \n\tSTIMULI_ID=%s,\n\tTARGET_ADDRESS=%s' % (stimuli_step_id, addr))
try:
# Generate IUT CMD for stimuli
cmd = self.iut_base_cmd
cmd += ' {option} {value}'.format(option='-s', value=self.stimuli_step_id)
cmd += ' {option} {value}'.format(option='-s', value=stimuli_step_id)
# Execute IUT CMD for stimuli
logger.info('Spawning process with : %s' % cmd)
logging.info('Spawning process with : %s' % cmd)
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
proc.wait(timeout=STIMULI_HANDLER_TOUT)
......@@ -49,11 +52,11 @@ class LeshanServerTrigger(AutomatedIUT):
while proc.poll() is None:
output += str(proc.stdout.readline())
output += str(proc.stdout.read())
logger.info('EXECUTED: %s' % stimuli_step_id)
logger.info('Process STDOUT: %s' % output)
logging.info('EXECUTED: %s' % stimuli_step_id)
logging.info('Process STDOUT: %s' % output)
except subprocess.TimeoutExpired as tout:
logger.warning('Process TIMEOUT. info: %s' % str(tout))