From 8fb5b10d8a60e06b9adebd22ecc118f13580375c Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 27 Mar 2018 18:36:30 +0200 Subject: [PATCH] Problem: `make dist` results are not tested (#3024) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * always run tests from tarball of `make dist` ensures that tests will not pass if critical files are omitted from releases * add explicit make dist only for non-default builds distcheck should already cover this for default builds * don’t verify that valgrind/coverage tests can be run from dists * add various files missing from dists - missing template from cmake - add missing android build files - add some missing ci_build.sh scripts --- Makefile.am | 1 + builds/Makefile.am | 5 +++++ ci_build.sh | 13 +++++++++++++ 3 files changed, 19 insertions(+) diff --git a/Makefile.am b/Makefile.am index c7e6bdf8..bcb60c24 100644 --- a/Makefile.am +++ b/Makefile.am @@ -944,6 +944,7 @@ EXTRA_DIST = \ autogen.sh \ version.sh \ src/libzmq.pc.cmake.in \ + ci_build.sh \ src/libzmq.vers \ src/version.rc.in \ tests/CMakeLists.txt \ diff --git a/builds/Makefile.am b/builds/Makefile.am index 0576e064..e7fe5e09 100644 --- a/builds/Makefile.am +++ b/builds/Makefile.am @@ -15,15 +15,20 @@ EXTRA_DIST = \ cygwin/Makefile.cygwin \ mingw32/Makefile.mingw32 \ mingw32/platform.hpp \ + cmake/ci_build.sh \ cmake/Modules \ cmake/NSIS.template32.in \ cmake/NSIS.template64.in \ cmake/ZeroMQConfig.cmake.in \ + cmake/clang-format-check.sh.in \ cmake/platform.hpp.in \ + valgrind/ci_build.sh \ valgrind/valgrind.supp \ valgrind/vg \ nuget/readme.nuget \ nuget/libzmq.autopkg \ + android/Dockerfile \ + android/README.md \ android/android_build_helper.sh \ android/ci_build.sh \ android/build.sh diff --git a/ci_build.sh b/ci_build.sh index dd8060e1..095ba3de 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -70,5 +70,18 @@ if [ $BUILD_TYPE == "default" ]; then make VERBOSE=1 -j5 distcheck ) || exit 1 else + # always install custom builds from dist + # to make sure that `make dist` doesn't omit any files required to build & test + # coverage, valgrind are special-case tests that aren't meant to be runnable from releases + if [ ${BUILD_TYPE} != "coverage" ] && [ ${BUILD_TYPE} != "valgrind" ]; then + ./autogen.sh + ./configure + make -j5 dist-gzip + V=$(./version.sh) + tar -xzf zeromq-$V.tar.gz + cd zeromq-$V + fi + + # start the actual build from inside the dist cd ./builds/${BUILD_TYPE} && ./ci_build.sh fi