From 2b3034a42fc0e8eaa06af444e8c3709fe4d33832 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Mon, 27 May 2024 19:10:21 +0300 Subject: [PATCH 1/3] Add lines for local testing into the buildbot docker files --- .buildbot/appimage/Dockerfile | 2 ++ .buildbot/tox-bionic/Dockerfile | 4 ++++ .buildbot/tox-focal/Dockerfile | 2 ++ .buildbot/tox-jammy/Dockerfile | 4 ++++ 4 files changed, 12 insertions(+) diff --git a/.buildbot/appimage/Dockerfile b/.buildbot/appimage/Dockerfile index 6c2b87d5..c4dde327 100644 --- a/.buildbot/appimage/Dockerfile +++ b/.buildbot/appimage/Dockerfile @@ -24,3 +24,5 @@ RUN wget -qO appimage-builder-x86_64.AppImage \ https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage ADD . . + +CMD .buildbot/tox-bionic/build.sh diff --git a/.buildbot/tox-bionic/Dockerfile b/.buildbot/tox-bionic/Dockerfile index 5cc36b7f..1acf58dc 100644 --- a/.buildbot/tox-bionic/Dockerfile +++ b/.buildbot/tox-bionic/Dockerfile @@ -20,3 +20,7 @@ RUN python3.8 -m pip install --upgrade pip tox virtualenv ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 + +ADD . . + +CMD .buildbot/tox-bionic/test.sh diff --git a/.buildbot/tox-focal/Dockerfile b/.buildbot/tox-focal/Dockerfile index c2ba0ffc..fecc0819 100644 --- a/.buildbot/tox-focal/Dockerfile +++ b/.buildbot/tox-focal/Dockerfile @@ -13,3 +13,5 @@ RUN apt-get install -yq --no-install-suggests --no-install-recommends \ RUN python3.9 -m pip install --upgrade pip tox virtualenv ADD . . + +CMD .buildbot/tox-focal/test.sh diff --git a/.buildbot/tox-jammy/Dockerfile b/.buildbot/tox-jammy/Dockerfile index 8ca63aa0..b15c3b8f 100644 --- a/.buildbot/tox-jammy/Dockerfile +++ b/.buildbot/tox-jammy/Dockerfile @@ -10,3 +10,7 @@ RUN apt-get install -yq --no-install-suggests --no-install-recommends \ python3-dev python3-pip language-pack-en qt5dxcb-plugin tor xvfb RUN pip install tox + +ADD . . + +CMD .buildbot/tox-jammy/test.sh -- 2.45.1 From b68beaab206b23a441996367e6b908a963bde47b Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sun, 2 Jun 2024 04:16:22 +0300 Subject: [PATCH 2/3] Update and rename the script for testing with docker --- docker-test.sh | 11 +++++++++++ run-tests-in-docker.sh | 13 ------------- 2 files changed, 11 insertions(+), 13 deletions(-) create mode 100755 docker-test.sh delete mode 100755 run-tests-in-docker.sh diff --git a/docker-test.sh b/docker-test.sh new file mode 100755 index 00000000..18b6569a --- /dev/null +++ b/docker-test.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +DOCKERFILE=.buildbot/tox-bionic/Dockerfile + +docker build -t pybm/tox -f $DOCKERFILE . + +if [ $? -gt 0 ]; then + docker build --no-cache -t pybm/tox -f $DOCKERFILE . +fi + +docker run --rm -it pybm/tox diff --git a/run-tests-in-docker.sh b/run-tests-in-docker.sh deleted file mode 100755 index 174cb754..00000000 --- a/run-tests-in-docker.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -DOCKERFILE=packages/docker/Dockerfile.bionic - -# explicitly mark appimage stage because it builds in any case -docker build --target appimage -t pybm/appimage -f $DOCKERFILE . - -if [ $? -gt 0 ]; then - docker build --no-cache --target appimage -t pybm/appimage -f $DOCKERFILE . -fi - -docker build --target tox -t pybm/tox -f $DOCKERFILE . -docker run --rm -t pybm/tox -- 2.45.1 From 65d2a37cb22cfc37fa9561d90a3de845f54c41f9 Mon Sep 17 00:00:00 2001 From: Lee Miller Date: Sun, 2 Jun 2024 04:57:10 +0300 Subject: [PATCH 3/3] Extend environment markers for PyQt5 - doesn't install on arm --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6f4a22fb..c787d2dd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ coverage psutil pycryptodome -PyQt5;python_version>="3.7" +PyQt5;python_version>="3.7" and platform_machine=="x86_64" mock;python_version<="2.7" python_prctl;platform_system=="Linux" six -- 2.45.1