From 8b3a93658816c49d1e55c07c8bdd68c5bbdde688 Mon Sep 17 00:00:00 2001 From: nietingting Date: Mon, 26 Sep 2022 10:05:57 +0800 Subject: [PATCH] ci: enable pytest on docker file Signed-off-by: nietingting --- tools/ci/cibuild.sh | 7 ++++++- tools/ci/docker/linux/Dockerfile | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/ci/cibuild.sh b/tools/ci/cibuild.sh index 19ca20de098..68001c65ba2 100755 --- a/tools/ci/cibuild.sh +++ b/tools/ci/cibuild.sh @@ -62,7 +62,12 @@ function python-tools { PYTHONUSERBASE=${prebuilt}/pylocal export PYTHONUSERBASE add_path "${PYTHONUSERBASE}"/bin - pip3 install pexpect + pip3 install pexpect==4.8.0 + pip3 install pytest==6.2.5 + pip3 install pytest-repeat==0.9.1 + pip3 install pytest-json==0.4.0 + pip3 install pytest-ordering==0.6 + pip3 install pyserial==3.5 # MCUboot's tool for image signing and key management if ! command -v imgtool &> /dev/null; then diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index 54c0fd7adff..66850cb4f4d 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -264,6 +264,13 @@ ENV PIP_NO_CACHE_DIR=0 RUN pip3 install setuptools wheel # Install CodeChecker and use it to statically analyze the code. RUN pip3 install CodeChecker +# Install pytest +RUN pip3 install pexpect==4.8.0 +RUN pip3 install pytest==6.2.5 +RUN pip3 install pytest-repeat==0.9.1 +RUN pip3 install pytest-json==0.4.0 +RUN pip3 install pytest-ordering==0.6 +RUN pip3 install pyserial==3.5 RUN mkdir /tools WORKDIR /tools