Skip to content

Commit

Permalink
Merge oetest into oe
Browse files Browse the repository at this point in the history
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
  • Loading branch information
JoshuaWatt committed Jan 20, 2022
1 parent f07be66 commit 5daa9d1
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 41 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 19 additions & 2 deletions ci/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down Expand Up @@ -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):
"""
Expand All @@ -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")
Expand Down
37 changes: 11 additions & 26 deletions image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ ENV PYREX_BASE none
LABEL maintainer="Joshua Watt <[email protected]>"

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
Expand Down Expand Up @@ -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 /
Expand All @@ -512,8 +516,9 @@ ENV PYREX_BASE none
LABEL maintainer="Joshua Watt <[email protected]>"

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 \
Expand Down Expand Up @@ -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 /
Expand All @@ -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.
#
Expand Down

0 comments on commit 5daa9d1

Please sign in to comment.