| # |
| # Copyright 2023 Google LLC |
| # |
| # This program is free software; you can redistribute it and/or |
| # modify it under the terms of the GNU General Public License |
| # version 2 as published by the Free Software Foundation. |
| # |
| # This program is distributed in the hope that it will be useful, |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| # GNU General Public License for more details. |
| # |
| EAPI=7 |
| |
| inherit toolchain-funcs go-module |
| |
| MY_PV="${PV/_/-}" |
| MY_PN="${PN/-test/}" |
| MY_P="${MY_PN}-${MY_PV}" |
| |
| |
| # Updated from go.mod - https://github.com/containerd/containerd/blob/v1.7.0/integration/client/go.mod |
| EGO_SUM=( |
| "github.com/containerd/containerd v${MY_PV}" |
| "github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1" |
| "github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod" |
| "github.com/AdamKorcz/go-fuzz-headers-1 v0.0.0-20230111232327-1f10f66a31bf" |
| "github.com/AdamKorcz/go-fuzz-headers-1 v0.0.0-20230111232327-1f10f66a31bf/go.mod" |
| "github.com/Microsoft/hcsshim v0.10.0-rc.7" |
| "github.com/Microsoft/hcsshim v0.10.0-rc.7/go.mod" |
| "github.com/Microsoft/hcsshim/test v0.0.0-20210408205431-da33ecd607e1" |
| "github.com/Microsoft/hcsshim/test v0.0.0-20210408205431-da33ecd607e1/go.mod" |
| "github.com/containerd/cgroups/v3 v3.0.1" |
| "github.com/containerd/cgroups/v3 v3.0.1/go.mod" |
| "github.com/containerd/go-runc v1.0.0" |
| "github.com/containerd/go-runc v1.0.0/go.mod" |
| "github.com/containerd/ttrpc v1.2.1" |
| "github.com/containerd/ttrpc v1.2.1/go.mod" |
| "github.com/containerd/typeurl/v2 v2.1.0" |
| "github.com/containerd/typeurl/v2 v2.1.0/go.mod" |
| "github.com/opencontainers/go-digest v1.0.0" |
| "github.com/opencontainers/go-digest v1.0.0/go.mod" |
| "github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b" |
| "github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod" |
| "github.com/opencontainers/runtime-spec v1.1.0-rc.1" |
| "github.com/opencontainers/runtime-spec v1.1.0-rc.1/go.mod" |
| "github.com/sirupsen/logrus v1.9.0" |
| "github.com/sirupsen/logrus v1.9.0/go.mod" |
| "github.com/stretchr/testify v1.8.2" |
| "github.com/stretchr/testify v1.8.2/go.mod" |
| "go.opentelemetry.io/otel v1.14.0" |
| "go.opentelemetry.io/otel v1.14.0/go.mod" |
| "go.opentelemetry.io/otel/sdk v1.14.0" |
| "go.opentelemetry.io/otel/sdk v1.14.0/go.mod" |
| "github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652" |
| "github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652/go.mod" |
| "github.com/Microsoft/go-winio v0.6.0" |
| "github.com/Microsoft/go-winio v0.6.0/go.mod" |
| "github.com/cilium/ebpf v0.9.1" |
| "github.com/cilium/ebpf v0.9.1/go.mod" |
| "github.com/containerd/cgroups v1.1.0" |
| "github.com/containerd/cgroups v1.1.0/go.mod" |
| "github.com/containerd/console v1.0.3" |
| "github.com/containerd/console v1.0.3/go.mod" |
| "github.com/containerd/continuity v0.3.0" |
| "github.com/containerd/continuity v0.3.0/go.mod" |
| "github.com/containerd/fifo v1.1.0" |
| "github.com/containerd/fifo v1.1.0/go.mod" |
| "github.com/coreos/go-systemd/v22 v22.5.0" |
| "github.com/coreos/go-systemd/v22 v22.5.0/go.mod" |
| "github.com/cyphar/filepath-securejoin v0.2.3" |
| "github.com/cyphar/filepath-securejoin v0.2.3/go.mod" |
| "github.com/davecgh/go-spew v1.1.1" |
| "github.com/davecgh/go-spew v1.1.1/go.mod" |
| "github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c" |
| "github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod" |
| "github.com/docker/go-units v0.5.0" |
| "github.com/docker/go-units v0.5.0/go.mod" |
| "github.com/go-logr/logr v1.2.3" |
| "github.com/go-logr/logr v1.2.3/go.mod" |
| "github.com/go-logr/stdr v1.2.2" |
| "github.com/go-logr/stdr v1.2.2/go.mod" |
| "github.com/godbus/dbus/v5 v5.1.0" |
| "github.com/godbus/dbus/v5 v5.1.0/go.mod" |
| "github.com/gogo/protobuf v1.3.2" |
| "github.com/gogo/protobuf v1.3.2/go.mod" |
| "github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da" |
| "github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod" |
| "github.com/golang/protobuf v1.5.2" |
| "github.com/golang/protobuf v1.5.2/go.mod" |
| "github.com/google/go-cmp v0.5.9" |
| "github.com/google/go-cmp v0.5.9/go.mod" |
| "github.com/google/uuid v1.3.0" |
| "github.com/google/uuid v1.3.0/go.mod" |
| "github.com/imdario/mergo v0.3.13" |
| "github.com/imdario/mergo v0.3.13/go.mod" |
| "github.com/klauspost/compress v1.16.0" |
| "github.com/klauspost/compress v1.16.0/go.mod" |
| "github.com/moby/locker v1.0.1" |
| "github.com/moby/locker v1.0.1/go.mod" |
| "github.com/moby/sys/mountinfo v0.6.2" |
| "github.com/moby/sys/mountinfo v0.6.2/go.mod" |
| "github.com/moby/sys/sequential v0.5.0" |
| "github.com/moby/sys/sequential v0.5.0/go.mod" |
| "github.com/moby/sys/signal v0.7.0" |
| "github.com/moby/sys/signal v0.7.0/go.mod" |
| "github.com/opencontainers/runc v1.1.4" |
| "github.com/opencontainers/runc v1.1.4/go.mod" |
| "github.com/opencontainers/selinux v1.11.0" |
| "github.com/opencontainers/selinux v1.11.0/go.mod" |
| "github.com/pelletier/go-toml v1.9.5" |
| "github.com/pelletier/go-toml v1.9.5/go.mod" |
| "github.com/pkg/errors v0.9.1" |
| "github.com/pkg/errors v0.9.1/go.mod" |
| "github.com/pmezard/go-difflib v1.0.0" |
| "github.com/pmezard/go-difflib v1.0.0/go.mod" |
| "go.opencensus.io v0.24.0" |
| "go.opencensus.io v0.24.0/go.mod" |
| "go.opentelemetry.io/otel/trace v1.14.0" |
| "go.opentelemetry.io/otel/trace v1.14.0/go.mod" |
| "golang.org/x/mod v0.7.0" |
| "golang.org/x/mod v0.7.0/go.mod" |
| "golang.org/x/net v0.7.0" |
| "golang.org/x/net v0.7.0/go.mod" |
| "golang.org/x/sync v0.1.0" |
| "golang.org/x/sync v0.1.0/go.mod" |
| "golang.org/x/text v0.7.0" |
| "golang.org/x/text v0.7.0/go.mod" |
| "golang.org/x/tools v0.5.0" |
| "golang.org/x/tools v0.5.0/go.mod" |
| "golang.org/x/sys v0.6.0" |
| "golang.org/x/sys v0.6.0/go.mod" |
| "google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4" |
| "google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod" |
| "google.golang.org/grpc v1.53.0" |
| "google.golang.org/grpc v1.53.0/go.mod" |
| "google.golang.org/protobuf v1.28.1" |
| "google.golang.org/protobuf v1.28.1/go.mod" |
| "gopkg.in/yaml.v3 v3.0.1" |
| "gopkg.in/yaml.v3 v3.0.1/go.mod" |
| ) |
| |
| go-module_set_globals |
| |
| DESCRIPTION="Test source for containerd" |
| HOMEPAGE="https://containerd.io/" |
| SRC_URI="https://github.com/containerd/containerd/archive/v${PV}.tar.gz -> ${MY_P}-real.tar.gz |
| ${EGO_SUM_SRC_URI}" |
| |
| |
| # This includes the licenses of dependencies as the binary is statically linked. |
| # |
| # If LICENSE contains BSD, ISC, or MIT, then chromite will scan the source for |
| # copyright attribution. If the package vendors its dependencies or includes a |
| # THIRD_PARTY_LICENSES/ directory, then chromite will properly attribute all |
| # dependencies in about_os_credits.html. |
| # |
| # This list was determined by inspecting the output of: |
| # go-licenses csv github.com/containerd/containerd/cmd/containerd |
| # go-licenses csv github.com/containerd/containerd/cmd/ctr |
| # go-licenses csv github.com/containerd/containerd/cmd/containerd-shim |
| # go-licenses csv github.com/containerd/containerd/cmd/containerd-shim-runc-v1 |
| # go-licenses csv github.com/containerd/containerd/cmd/containerd-shim-runc-v2 |
| # go-licenses csv github.com/containerd/containerd/cmd/containerd-stress |
| # inside a clone of the package repo. |
| # https://github.com/google/go-licenses |
| LICENSE="Apache-2.0 BSD-2 BSD ISC MIT MPL-2.0" |
| SLOT="0" |
| KEYWORDS="*" |
| |
| PATCHES=( |
| "${FILESDIR}"/1.7.0-Add-cgroup-parent-to-PodSandboxConfig.patch |
| ) |
| |
| src_unpack() { |
| default |
| mv "${WORKDIR}/${MY_P}" "${WORKDIR}/${MY_PN}" |
| S="${WORKDIR}/${MY_PN}" |
| go-module_src_unpack |
| } |
| |
| src_compile() { |
| # lakitu: Use the go cross-compiler |
| GO="$(tc-getGO)" |
| export GO |
| |
| GOFLAGS="-v -x -mod=vendor" ${GO} test -c ./integration \ |
| -o bin/cri-integration.test |
| |
| cd integration/client || die |
| CGO_ENABLED=0 ${GO} test -c . -o bin/client.test |
| } |
| |
| src_install(){ |
| TESTS_DIR=/usr/local/tests/"${MY_PN}" |
| insinto "${TESTS_DIR}" |
| doins -r "${S}"/bin |
| |
| exeinto "${TESTS_DIR}"/bin |
| doexe "${S}"/bin/cri-integration.test |
| doexe "${S}"/integration/client/bin/client.test |
| } |