Accepting request 683630 from home:cyphar:containers:docker-test

- docker-test: improvements to test packaging (we don't need to ship around the
  entire source tree, and we also need to build the born-again integration/
  tests which contain a suite-per-directory).

OBS-URL: https://build.opensuse.org/request/show/683630
OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=291
This commit is contained in:
Aleksa Sarai 2019-03-10 21:59:21 +00:00 committed by Git OBS Bridge
parent b54f093209
commit 1711b55eb5
3 changed files with 9 additions and 8 deletions

View File

@ -3,8 +3,7 @@ Sun Mar 10 21:12:09 UTC 2019 - Aleksa Sarai <asarai@suse.com>
- docker-test: improvements to test packaging (we don't need to ship around the
entire source tree, and we also need to build the born-again integration/
tests which contain a suite-per-directory). tests.sh will need to be updated,
but this will be done in a follow-up.
tests which contain a suite-per-directory).
-------------------------------------------------------------------
Tue Feb 26 09:39:57 UTC 2019 - Michal Jura <mjura@suse.com>

View File

@ -280,6 +280,8 @@ docker container runtime configuration for kubeadm
%patch500 -p1
%endif
cp %{SOURCE7} .
%build
BUILDTAGS="exclude_graphdriver_aufs apparmor selinux seccomp pkcs11"
%if 0%{?sle_version} == 120000
@ -326,13 +328,13 @@ pushd components/engine/
# within the testdir -- we will only end up installing these test files for
# docker-test.
for testdir in {integration-cli,integration/*/}
do
( find "$testdir" -name '*_test.go' | grep -q '.' ) || continue
GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
-buildmode=pie \
-tags "$DOCKER_BUILDTAGS daemon autogen" \
-c "github.com/docker/docker/$testdir" -o "$testdir/tests.main"
do
done
popd
###################
@ -364,7 +366,6 @@ grep 'CONTAINERD_COMMIT=%{required_containerd}' hack/dockerfile/install/containe
grep 'LIBNETWORK_COMMIT=%{required_libnetwork}' hack/dockerfile/install/proxy.installer
%install
install -d %{buildroot}%{go_contribdir}
install -d %{buildroot}%{_bindir}
install -D -m755 components/cli/build/docker %{buildroot}/%{_bindir}/docker
install -D -m755 components/engine/bundles/latest/dynbinary-daemon/dockerd %{buildroot}/%{_bindir}/dockerd
@ -378,10 +379,11 @@ install -D -m0644 components/cli/contrib/completion/zsh/_docker "%{buildroot}%{_
# We only need all our built tests.main and hack/ for testing purposes.
install -d %{buildroot}%{_prefix}/src/docker/
install -D -m0755 %{SOURCE9} %{buildroot}%{_prefix}/src/docker/tests.sh
pushd components/engine
cp -a integration/ integration-cli/ %{buildroot}%{_prefix}/src/docker/
find %{buildroot}%{_prefix}/src/docker/ -not -name 'tests.main' -delete
find %{buildroot}%{_prefix}/src/docker/ \
\( -type f -not -name 'tests.main' \) -or \( -type d -empty \) -delete
install -D -m0755 %{SOURCE9} %{buildroot}%{_prefix}/src/docker/tests.sh
cp -a hack/ %{buildroot}%{_prefix}/src/docker/
popd

View File

@ -8,7 +8,7 @@
DOCKER_DIR=/usr/src/docker
SCRIPTS_DIR=$DOCKER_DIR/hack
TESTS_EXE=$SCRIPTS_DIR/integration-cli/tests.main
TESTS_EXE=$DOCKER_DIR/integration-cli/tests.main
VERSION=$(cat $DOCKER_DIR/VERSION)
# working dirs