Accepting request 683628 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). tests.sh will need to be updated, but this will be done in a follow-up. OBS-URL: https://build.opensuse.org/request/show/683628 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=290
This commit is contained in:
parent
1080cf620d
commit
b54f093209
@ -1,7 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
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.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 26 09:39:57 UTC 2019 - Michal Jura <mjura@suse.com>
|
||||
|
||||
- Move daemon.json file to /etc/docker directory, bsc#1114832
|
||||
- Move daemon.json file to /etc/docker directory, bsc#1114832
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 9 13:54:03 UTC 2019 - Aleksa Sarai <asarai@suse.com>
|
||||
|
53
docker.spec
53
docker.spec
@ -280,9 +280,6 @@ docker container runtime configuration for kubeadm
|
||||
%patch500 -p1
|
||||
%endif
|
||||
|
||||
cp %{SOURCE7} .
|
||||
cp %{SOURCE9} .
|
||||
|
||||
%build
|
||||
BUILDTAGS="exclude_graphdriver_aufs apparmor selinux seccomp pkcs11"
|
||||
%if 0%{?sle_version} == 120000
|
||||
@ -317,19 +314,32 @@ mkdir -p src/github.com/docker/
|
||||
ln -s $(pwd)/components/cli $(pwd)/src/github.com/docker/cli
|
||||
export GOPATH=$GOPATH:$(pwd)
|
||||
|
||||
# DOCKER ENGINE
|
||||
###################
|
||||
## DOCKER ENGINE ##
|
||||
###################
|
||||
|
||||
pushd components/engine/
|
||||
# ignore the warning that we compile outside a Docker container
|
||||
# Ignore the warning that we compile outside a Docker container.
|
||||
./hack/make.sh dynbinary
|
||||
# build the tests binary
|
||||
GOPATH=$(pwd)/vendor:$(pwd)/.gopath/ go test \
|
||||
-buildmode=pie \
|
||||
-tags "$DOCKER_BUILDTAGS daemon autogen" \
|
||||
-c github.com/docker/docker/integration-cli -o tests.main
|
||||
|
||||
# Build test binaries (integration-cli and integration/*). They are all stored
|
||||
# within the testdir -- we will only end up installing these test files for
|
||||
# docker-test.
|
||||
for testdir in {integration-cli,integration/*/}
|
||||
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
|
||||
|
||||
# DOCKER CLIENT
|
||||
pushd components/cli
|
||||
###################
|
||||
## DOCKER CLIENT ##
|
||||
###################
|
||||
|
||||
pushd components/cli/
|
||||
./scripts/build/dynbinary
|
||||
|
||||
mkdir -p ./man/man1
|
||||
@ -365,10 +375,15 @@ install -Dd -m 0755 \
|
||||
|
||||
install -D -m0644 components/cli/contrib/completion/bash/docker "%{buildroot}%{_sysconfdir}/bash_completion.d/%{realname}"
|
||||
install -D -m0644 components/cli/contrib/completion/zsh/_docker "%{buildroot}%{_sysconfdir}/zsh_completion.d/%{realname}"
|
||||
# copy all for the test package
|
||||
|
||||
# We only need all our built tests.main and hack/ for testing purposes.
|
||||
install -d %{buildroot}%{_prefix}/src/docker/
|
||||
cp -a components/engine/. %{buildroot}%{_prefix}/src/docker/engine
|
||||
cp -a components/cli/. %{buildroot}%{_prefix}/src/docker/cli
|
||||
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
|
||||
cp -a hack/ %{buildroot}%{_prefix}/src/docker/
|
||||
popd
|
||||
|
||||
#
|
||||
# systemd service
|
||||
@ -473,14 +488,6 @@ getent group docker >/dev/null || groupadd -r docker
|
||||
%files test
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/src/docker/
|
||||
# exclude binaries
|
||||
%exclude %{_prefix}/src/docker/engine/bundles/
|
||||
%exclude %{_prefix}/src/docker/cli/build/
|
||||
# exclude init configurations other than systemd
|
||||
%exclude %{_prefix}/src/docker/engine/contrib/init/openrc
|
||||
%exclude %{_prefix}/src/docker/engine/contrib/init/sysvinit-debian
|
||||
%exclude %{_prefix}/src/docker/engine/contrib/init/sysvinit-redhat
|
||||
%exclude %{_prefix}/src/docker/engine/contrib/init/upstart
|
||||
|
||||
%if "%flavour" == "kubic"
|
||||
%files kubeadm-criconfig
|
||||
|
5
tests.sh
5
tests.sh
@ -1,15 +1,14 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Script for launching the Docker integration tests
|
||||
# XXX: We currently only support running integration-cli.
|
||||
#
|
||||
|
||||
#set -x
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
DOCKER_DIR=/usr/src/docker
|
||||
SCRIPTS_DIR=$DOCKER_DIR/hack
|
||||
TESTS_EXE=$SCRIPTS_DIR/tests.main
|
||||
TESTS_EXE=$SCRIPTS_DIR/integration-cli/tests.main
|
||||
VERSION=$(cat $DOCKER_DIR/VERSION)
|
||||
|
||||
# working dirs
|
||||
|
Loading…
Reference in New Issue
Block a user