From 5daa9d116a8e08f2dbf22bc08d21b57d40349f13 Mon Sep 17 00:00:00 2001 From: Joshua Watt Date: Wed, 19 Jan 2022 10:27:19 -0600 Subject: [PATCH] Merge oetest into oe The oegarmin images need to be based on oetest so that SDK testing can be done; simplify the setup by effectively removing the oetest images and rolling their changes up into the parent oe images. The oetest image will still be built, but will be identical to the oe images and will be removed in the future --- .github/workflows/main.yml | 26 +++++++++++++----------- .github/workflows/release.yml | 4 ++-- ci/test.py | 21 ++++++++++++++++++-- image/Dockerfile | 37 +++++++++++------------------------ 4 files changed, 47 insertions(+), 41 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d1442a3..740251e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,17 +61,21 @@ jobs: fail-fast: false matrix: include: - - {image: ubuntu-14.04-base, provider: docker, sh: bash} - - {image: ubuntu-14.04-oe, provider: docker, sh: bash} - - {image: ubuntu-16.04-base, provider: docker, sh: bash} - - {image: ubuntu-16.04-oe, provider: docker, sh: bash} - - {image: ubuntu-18.04-base, provider: docker, sh: bash} - - {image: ubuntu-18.04-oe, provider: docker, sh: zsh } - - {image: ubuntu-18.04-oetest, provider: docker, sh: bash} - - {image: ubuntu-20.04-base, provider: docker, sh: bash} - - {image: ubuntu-20.04-oe, provider: docker, sh: bash} - - {image: ubuntu-20.04-oe, provider: podman, sh: bash} - - {image: ubuntu-20.04-oetest, provider: docker, sh: bash} + - {image: ubuntu-14.04-base, provider: docker, sh: bash} + - {image: ubuntu-14.04-oe, provider: docker, sh: bash} + - {image: ubuntu-14.04-oegarmin, provider: docker, sh: bash} + - {image: ubuntu-16.04-base, provider: docker, sh: bash} + - {image: ubuntu-16.04-oe, provider: docker, sh: bash} + - {image: ubuntu-16.04-oegarmin, provider: docker, sh: bash} + - {image: ubuntu-18.04-base, provider: docker, sh: bash} + - {image: ubuntu-18.04-oe, provider: docker, sh: zsh } + - {image: ubuntu-18.04-oetest, provider: docker, sh: bash} + - {image: ubuntu-18.04-oegarmin, provider: docker, sh: bash} + - {image: ubuntu-20.04-base, provider: docker, sh: bash} + - {image: ubuntu-20.04-oe, provider: docker, sh: bash} + - {image: ubuntu-20.04-oe, provider: podman, sh: bash} + - {image: ubuntu-20.04-oetest, provider: docker, sh: bash} + - {image: ubuntu-20.04-oegarmin, provider: docker, sh: bash} runs-on: ubuntu-20.04 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efe41aa..0704731 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,12 +18,12 @@ jobs: - image: ubuntu-16.04-oegarmin - image: ubuntu-18.04-base - image: ubuntu-18.04-oe - - image: ubuntu-18.04-oegarmin - image: ubuntu-18.04-oetest + - image: ubuntu-18.04-oegarmin - image: ubuntu-20.04-base - image: ubuntu-20.04-oe - - image: ubuntu-20.04-oegarmin - image: ubuntu-20.04-oetest + - image: ubuntu-20.04-oegarmin runs-on: ubuntu-20.04 diff --git a/ci/test.py b/ci/test.py index eb9883f..9958dd9 100755 --- a/ci/test.py +++ b/ci/test.py @@ -44,6 +44,19 @@ def wrapper(self, *args, **kwargs): return wrapper +def skipIfOS(os, version): + def decorator(func): + def wrapper(self, *args, **kwargs): + (image_os, image_version, _) = self.test_image.split("-") + if image_os == os and image_version == version: + self.skipTest("Test does not apply to %s-%s" % (os, version)) + return func(self, *args, **kwargs) + + return wrapper + + return decorator + + built_images = set() @@ -1091,6 +1104,11 @@ def test_bb_env_extrawhite_parse(self): ) self.assertEqual(s, 'TEST_BB_EXTRA="foo"') + @skipIfOS("ubuntu", "14.04") + @skipIfOS("ubuntu", "16.04") + def test_wine(self): + self.assertPyrexContainerCommand("wine --version") + class PyrexImageType_oegarmin(PyrexImageType_oe): """ @@ -1106,8 +1124,7 @@ class PyrexImageType_oetest(PyrexImageType_oe): Tests images designed for building OpenEmbedded Test image """ - def test_wine(self): - self.assertPyrexContainerCommand("wine --version") + pass PROVIDERS = ("docker", "podman") diff --git a/image/Dockerfile b/image/Dockerfile index 3b019ab..1b4db85 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -446,6 +446,7 @@ ENV PYREX_BASE none LABEL maintainer="Joshua Watt " RUN set -x && export DEBIAN_FRONTEND=noninteractive && \ + sudo dpkg --add-architecture i386 && \ ulimit -n 1024 && \ apt-get -y update && apt-get -y install \ # Poky 2.7 build dependencies @@ -496,10 +497,13 @@ RUN set -x && export DEBIAN_FRONTEND=noninteractive && \ # Base OS stuff that reasonable workstations have, but which the registry image # doesn't tzdata \ +# Testing requirements + wine64 \ + wine32 \ && rm -rf /var/lib/apt/lists/* # Python modules used by resulttool -RUN python3 -m pip install iterfzf +RUN python3 -m pip install iterfzf testtools python-subunit # Copy prebuilt items COPY --from=prebuilt-icecream /dist/icecream / @@ -512,8 +516,9 @@ ENV PYREX_BASE none LABEL maintainer="Joshua Watt " RUN set -x && export DEBIAN_FRONTEND=noninteractive && \ + sudo dpkg --add-architecture i386 && \ ulimit -n 1024 && \ - apt-get -y update && apt-get -y install \ + apt -y update && apt upgrade apt -y && apt -y install \ # Poky 3.3 build dependencies gawk \ wget \ @@ -569,10 +574,12 @@ RUN set -x && export DEBIAN_FRONTEND=noninteractive && \ tzdata \ # Dependencies for other layers xxd \ +# Testing requirements + wine64 \ + wine32 \ && rm -rf /var/lib/apt/lists/* -# Python modules used by resulttool -RUN python3 -m pip install iterfzf +RUN python3 -m pip install iterfzf testtools python-subunit # Copy prebuilt items COPY --from=prebuilt-icecream /dist/icecream / @@ -583,34 +590,12 @@ COPY --from=prebuilt-icecream /dist/icecream / FROM ubuntu-18.04-oe as ubuntu-18.04-oetest ENV PYREX_BASE none -RUN set -x && export DEBIAN_FRONTEND=noninteractive && \ - sudo dpkg --add-architecture i386 && \ - apt-get -y update && apt-get -y install \ - wine64 \ - wine32 \ -&& rm -rf /var/lib/apt/lists/* - -# Python modules used for tests -RUN python3 -m pip install testtools python-subunit - # # Ubuntu 20.04 OE Test Image # FROM ubuntu-20.04-oe as ubuntu-20.04-oetest ENV PYREX_BASE none -RUN set -x && export DEBIAN_FRONTEND=noninteractive && \ - sudo dpkg --add-architecture i386 && \ - apt -y update && \ - apt -y upgrade apt && \ - apt -y install \ - wine64 \ - wine32 \ -&& rm -rf /var/lib/apt/lists/* - -# Python modules used for tests -RUN python3 -m pip install testtools python-subunit - # # Ubuntu 14.04 Base, customized with Garmin internal LAN configuration. #