diff --git a/docker.changes b/docker.changes index 1855db0..c7bdbbf 100644 --- a/docker.changes +++ b/docker.changes @@ -3,8 +3,7 @@ Sun Mar 10 21:12:09 UTC 2019 - Aleksa Sarai - 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 diff --git a/docker.spec b/docker.spec index c71b09c..b0c8228 100644 --- a/docker.spec +++ b/docker.spec @@ -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 diff --git a/tests.sh b/tests.sh index 351a780..cd23ba8 100644 --- a/tests.sh +++ b/tests.sh @@ -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