Skip to content

No port for robot framework found inside docker container #1

@crolfes

Description

@crolfes

When running pyrenode inside the official renode 14.0 docker container the example.py is failling, because the robot port is not found.

developer@7848a369104a:~/pyrenode$ ./example.py
[2023-08-23 08:40:59,429 pyrenode.py:553] [ERROR] get_robot_port failed: Missing file with robot port
[2023-08-23 08:40:59,430 pyrenode.py:140] [ERROR] Exception occurred during initialization:
Traceback (most recent call last):
  File "/home/developer/pyrenode/pyrenode/pyrenode.py", line 130, in initialize
    self._open_robot(
  File "/home/developer/pyrenode/pyrenode/pyrenode.py", line 511, in _open_robot
    robot_port = self._retry_until_success(
  File "/home/developer/pyrenode/pyrenode/pyrenode.py", line 549, in _retry_until_success
    return func(*func_args, **func_kwargs)
  File "/home/developer/pyrenode/pyrenode/pyrenode.py", line 501, in get_robot_port
    raise FileNotFoundError('Missing file with robot port')
FileNotFoundError: Missing file with robot port

[2023-08-23 08:41:29,486 pyrenode.py:183] [ERROR] Renode did not close properly after 30s
Importing keywords:

Traceback (most recent call last):
  File "./example.py", line 8, in <module>
    ExecuteCommand('i @scripts/single-node/sam_e70.resc')
NameError: name 'ExecuteCommand' is not defined

Here ist the dockerfile based on the antmicro renode image.

# Renode Board visualization dependencies
FROM antmicro/renode AS visual

# switch to user ROOT
USER root

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
 && apt-get install -y --no-install-recommends git \
 && rm -rf /var/lib/apt/lists/*


RUN git clone https://github.com/antmicro/renode-board-visualization.git
RUN chown 1000:1000 -R /home/developer/renode-board-visualization

# switch to user DEVELOPER and set homedir
USER developer
WORKDIR /home/developer

ENV PATH=/home/developer/.local/bin:$PATH
RUN export PATH=/home/developer/.local/bin:$PATH

## Test and install renode-run
RUN pip3 install --no-cache-dir -q git+https://github.com/antmicro/renode-run.git \
 && pip3 install --no-cache-dir -q git+https://github.com/antmicro/pyrenode.git \
 && renode-run --help

RUN git clone https://github.com/antmicro/pyrenode.git 

# set start behaviour of the container
WORKDIR /home/developer
CMD ["/bin/bash", "-c", "echo Hello to Renode Board Visualization docker image."]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions