From 434a433a092fee05f8bb011c1ac849a4665173f2 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 19 Nov 2015 21:36:16 +0000 Subject: [PATCH] Make output of packaging tests easier to understand Slight simplification of Linux packaging script --- .gitignore | 1 + packaging/lin/Dockerfile | 13 ++++--------- packaging/test.sh | 33 +++++++++++++-------------------- 3 files changed, 18 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index 221c9831..c616ca70 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ test/leak/libvips.supp lib include packaging/libvips* +packaging/*.log .DS_Store diff --git a/packaging/lin/Dockerfile b/packaging/lin/Dockerfile index 0a72abb2..343fce2a 100644 --- a/packaging/lin/Dockerfile +++ b/packaging/lin/Dockerfile @@ -12,7 +12,6 @@ ENV PATH ${PATH}:${TARGET}/bin ENV CPPFLAGS -I${TARGET}/include ENV LDFLAGS -L${TARGET}/lib -ENV MAKEFLAGS -j2 RUN mkdir ${DEPS}/zlib RUN curl -Ls http://zlib.net/zlib-1.2.8.tar.xz | tar xJC ${DEPS}/zlib --strip-components=1 @@ -89,16 +88,12 @@ RUN ./configure --prefix=${TARGET} --enable-shared --disable-static --disable-de --with-zip-includes=${TARGET}/include --with-zip-libraries=${TARGET}/lib \ --with-jpeg-includes=${TARGET}/include --with-jpeg-libraries=${TARGET}/lib \ && make install-strip -# Remove the C++ bindings -RUN rm ${TARGET}/lib/*.la -RUN rm ${TARGET}/lib/libvipsCC* -RUN rm ${TARGET}/lib/libvips-cpp.* -RUN rm ${TARGET}/include/vips/vipsc++.h -RUN rm ${TARGET}/include/vips/vipscpp.h -RUN rm ${TARGET}/include/vips/V*.h +# Remove the C++ bindings +WORKDIR ${TARGET}/include +RUN rm -rf vips/vipsc++.h vips/vipscpp.h vips/V*.h WORKDIR ${TARGET}/lib -RUN rm -rf pkgconfig .libs +RUN rm -rf pkgconfig .libs *.la libvipsCC* libvips-cpp.* WORKDIR ${TARGET} RUN GZIP=-9 tar czf /libvips-8.1.1-lin.tar.gz include lib diff --git a/packaging/test.sh b/packaging/test.sh index a9372a2a..a494122f 100755 --- a/packaging/test.sh +++ b/packaging/test.sh @@ -6,52 +6,45 @@ if ! type docker >/dev/null; then exit 1 fi -test="npm run clean; NODE_ENV=development npm install --unsafe-perm; npm test; npm run clean;" +test="npm run clean; NODE_ENV=development npm install --unsafe-perm; npm test" -# Debian 7 -echo -n "Testing wheezy... " -if docker run -i -t --rm -v $PWD:/v nodesource/wheezy:0.12 sh -c "cd /v; ./packaging/test/debian.sh; ./preinstall.sh; $test"; -then echo "OK" -else echo "fail" -fi - -# Debian 8 +# Debian 7, 8 # Ubuntu 12.04, 14.04 -for dist in jessie precise trusty; do +for dist in wheezy jessie precise trusty; do echo "Testing $dist..." - if docker run -i -t --rm -v $PWD:/v nodesource/$dist:0.12 sh -c "cd /v; ./packaging/test/debian.sh; $test"; + if docker run -i -t --rm -v $PWD:/v nodesource/$dist:0.12 >packaging/$dist.log 2>&1 sh -c "cd /v; ./packaging/test/debian.sh; $test"; then echo "$dist OK" - else echo "$dist fail" + else echo "$dist fail" && cat packaging/$dist.log fi done # Centos 6 echo "Testing centos6..." -if docker run -i -t --rm -v $PWD:/v nodesource/centos6:0.12 sh -c "cd /v; source ./packaging/test/centos6.sh; ./preinstall.sh; $test"; +if docker run -i -t --rm -v $PWD:/v nodesource/centos6:0.12 >packaging/centos6.log 2>&1 sh -c "cd /v; source ./packaging/test/centos6.sh; ./preinstall.sh; $test"; then echo "centos6 OK" -else echo "centos6 fail" +else echo "centos6 fail" && cat packaging/centos6.log fi # Centos 7 # Fedora 20, 21 for dist in centos7 fedora20 fedora21; do echo "Testing $dist..." - if docker run -i -t --rm -v $PWD:/v nodesource/$dist:0.12 sh -c "cd /v; $test"; + if docker run -i -t --rm -v $PWD:/v nodesource/$dist:0.12 >packaging/$dist.log 2>&1 sh -c "cd /v; $test"; then echo "$dist OK" - else echo "$dist fail" + else echo "$dist fail" && cat packaging/$dist.log fi done # openSUSE 13.2 echo "Testing opensuse..." -if docker run -i -t --rm -v $PWD:/v opensuse:13.2 /bin/sh -c "cd /v; ./packaging/test/opensuse.sh; $test"; +if docker run -i -t --rm -v $PWD:/v opensuse:13.2 >packaging/opensuse.log 2>&1 /bin/sh -c "cd /v; ./packaging/test/opensuse.sh; $test"; then echo "opensuse OK" -else echo "opensuse fail" +else echo "opensuse fail" && cat packaging/opensuse.log fi # Archlinux 2015.06.01 echo "Testing archlinux..." -if docker run -i -t --rm -v $PWD:/v base/archlinux:2015.06.01 sh -c "cd /v; ./packaging/test/archlinux.sh; $test"; +if docker run -i -t --rm -v $PWD:/v base/archlinux:2015.06.01 >packaging/archlinux.log 2>&1 sh -c "cd /v; ./packaging/test/archlinux.sh; $test"; then echo "archlinux OK" -else echo "archlinux fail" +else echo "archlinux fail" && cat packaging/archlinux.log fi