Skip to content
Snippets Groups Projects
Commit f9a262cc authored by Anders Lindh Olsson's avatar Anders Lindh Olsson :8ball:
Browse files

Merge branch 'e3-1719' into 'master'

E3-1719: Break bidirectional dependencies

See merge request !194
parents ca6b10d0 6273ca18
No related branches found
No related tags found
1 merge request!194E3-1719: Break bidirectional dependencies
Pipeline #206226 passed
---
variables:
E3_CI_BASE_VERSION: "7.0.8.1-NA/7.0.8.1-68332f4-20240917T140931"
E3_CI_MODIFIED_BASE_VERSION: "7.0.8.1-68332f4-20240917T140931"
E3_CI_MODIFIED_BASE_VERSION: "7.0.8.1-68332f4-20240917T140931" # strip the first part of the tag name - see E3-1529
stages:
- check
......@@ -68,22 +67,3 @@ test require:
- make test
needs:
- build require
test composite build:
stage: test
before_script:
- pip freeze
- pip install --upgrade pip
- pip install --upgrade e3 --index-url https://artifactory.esss.lu.se/artifactory/api/pypi/pypi-virtual/simple
- sed -i "s|BASE|${E3_CI_BASE_VERSION}|" tests/data/essioc.yml
- sed -i "s|REQUIRE|${CI_COMMIT_SHORT_SHA}|" tests/data/essioc.yml
# We need to use a different install-path to explicitly avoid the pre-existing EPICS base build
# with a hashed require version from previous jobs
- e3-build tests/data/essioc.yml --log-file test-composite-build.log --install-path $(pwd)/e3 --assume-yes
- source $(pwd)/e3/base-*/require/*/bin/activate
script:
- run-iocsh -r essioc
artifacts:
when: always
paths:
- "*.log"
pytest
run-iocsh
......@@ -6,7 +6,6 @@ from random import choice
from string import ascii_lowercase
from git import Repo
from run_iocsh import IOC
class Wrapper:
......@@ -179,6 +178,22 @@ def run_ioc_get_output(*args, **kwargs):
if cell_path:
ioc_args.extend(["-l", cell_path])
ioc_args.extend(args)
with IOC(*ioc_args, ioc_executable="iocsh") as ioc:
time.sleep(1)
return ioc.proc.returncode, ioc.outs, ioc.errs
proc = subprocess.Popen(
["iocsh", *ioc_args],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
time.sleep(1)
try:
stdout, stderr = proc.communicate(input=b"exit\n", timeout=5)
except subprocess.TimeoutExpired:
proc.kill()
# Trying to run `subprocess.Popen.communicate()` can raise
#
# ValueError: Invalid file object: <_io.BufferedReader name=7>
#
# when stdin is already closed.
return proc.returncode, stdout.decode("utf-8"), stderr.decode("utf-8")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment