From c6da782c9d9048647f6d7374a597fe1484d2d3eb Mon Sep 17 00:00:00 2001 From: Federico Cavalieri Date: Wed, 30 Dec 2015 17:48:40 +0100 Subject: [PATCH 1/5] Experimental multi-os testing --- circle.yml | 35 +++--------- docker/zorba-test/build.sh | 26 +++++++++ docker/zorba-test/docker-entrypoint.sh | 52 ++++++++++++++++++ docker/zorba-test/precise/Dockerfile | 73 ++++++++++++++++++++++++++ docker/zorba-test/publish.sh | 13 +++++ docker/zorba-test/trusty/Dockerfile | 61 +++++++++++++++++++++ docker/zorba-test/vivid/Dockerfile | 61 +++++++++++++++++++++ docker/zorba-test/wily/Dockerfile | 61 +++++++++++++++++++++ docker/{ => zorba}/Dockerfile | 0 import_tests.sh | 25 +++++++-- 10 files changed, 373 insertions(+), 34 deletions(-) create mode 100755 docker/zorba-test/build.sh create mode 100755 docker/zorba-test/docker-entrypoint.sh create mode 100644 docker/zorba-test/precise/Dockerfile create mode 100755 docker/zorba-test/publish.sh create mode 100644 docker/zorba-test/trusty/Dockerfile create mode 100644 docker/zorba-test/vivid/Dockerfile create mode 100644 docker/zorba-test/wily/Dockerfile rename docker/{ => zorba}/Dockerfile (100%) mode change 100644 => 100755 import_tests.sh diff --git a/circle.yml b/circle.yml index 506538b7ea..cbfbfb2bd5 100644 --- a/circle.yml +++ b/circle.yml @@ -1,44 +1,21 @@ -#This file is generated by https://github.com/wcandillon/zorba-circleci-tpl machine: - post: - - sudo apt-get update -qq -# - sudo apt-get install -f - - sudo apt-get purge "libmagick*" - - sudo apt-get purge "libboost*" - - sudo apt-get purge "texlive*" - - sudo apt-get purge "flex" - - sudo apt-get purge "libfl-dev" - - sudo apt-get install distcc lib64z1 lib64z1-dev uuid-dev libxerces-c-dev graphviz libboost-filesystem-dev libgeos++-dev imagemagick libmagick++-dev libmagickwand-dev libfop-java libpdfbox-java libtidy-dev libjempbox-java libfontbox-java libarchive-dev libmysqlclient-dev openjdk-6-jdk libaccess-bridge-java-jni libxslt-dev libcurl4-openssl-dev libxerces-c-dev doxygen libedit-dev libkvutils-dev - - sudo locale-gen de_DE && sudo locale-gen de_DE.UTF-8 && sudo locale-gen fr_FR && sudo locale-gen fr_FR.UTF-8 && sudo update-locale - - wget http://launchpadlibrarian.net/160037457/bison_3.0.2.dfsg-2_amd64.deb - - wget http://launchpadlibrarian.net/160037458/libbison-dev_3.0.2.dfsg-2_amd64.deb - - sudo dpkg -i libbison-dev_3.0.2.dfsg-2_amd64.deb bison_3.0.2.dfsg-2_amd64.deb - - sudo sed -i.bak s/STARTDISTCC=\"false\"/STARTDISTCC=\"true\"/g /etc/default/distcc - - sudo /etc/init.d/distcc start - - wget https://launchpad.net/ubuntu/+source/flex/2.5.39-8/+build/6118519/+files/libfl-dev_2.5.39-8_amd64.deb - - wget https://launchpad.net/ubuntu/+source/flex/2.5.39-8/+build/6118519/+files/flex_2.5.39-8_amd64.deb - - sudo dpkg -i libfl-dev_2.5.39-8_amd64.deb flex_2.5.39-8_amd64.deb environment: ZORBA_SRC_DIR: /home/ubuntu/zorba - ZORBA_BUILD_DIR: /home/ubuntu/zorba/build + ZORBA_BUILD_DIR: /home/ubuntu/build ZORBA_MODULE_DIR: /home/ubuntu/zorba_modules - DISTCC_HOSTS: "ubuntu@node0 ubuntu@node1 ubuntu@node2 ubuntu@node3" EXCLUDE_MODULES: "^zorba_info-extraction_module|conversion/currency-convert|zorba_couchbase_module|zorba_read-pdf_module|zorba_image_module|zorba_data-formatting_module" + services: + - docker dependencies: override: - - echo "ZORBA_SRC_DIR ${ZORBA_SRC_DIR}" - - echo "ZORBA_BUILD_DIR ${ZORBA_BUILD_DIR}" - - echo "ZORBA_MODULE_DIR ${ZORBA_MODULE_DIR}" - mkdir -p "${ZORBA_MODULE_DIR}" - cmake -Doutdir="${ZORBA_MODULE_DIR}" -Dallmodules=1 -P "${ZORBA_SRC_DIR}/modules/DownloadModules.cmake" - mkdir -p "${ZORBA_BUILD_DIR}" test: pre: - - case $CIRCLE_NODE_INDEX in 0) cd "${ZORBA_BUILD_DIR}" && CC="distcc gcc" CXX="distcc c++" cmake -DZORBA_MODULES_DIR="${ZORBA_MODULE_DIR}" -DZORBA_XQUERYX:BOOL=1 -DZORBA_TEST_XQUERYX:BOOL=1 -DZORBA_WITH_BIG_INTEGER=1 -DCMAKE_BUILD_TYPE=Release -DZORBA_TEST_PLAN_SERIALIZATION:BOOL=1 -DZORBATEST_USE_MT_XQTS:BOOL=1 "${ZORBA_SRC_DIR}" && make -j8 && bash "${ZORBA_SRC_DIR}/import_tests.sh" && make fots-activate-sets && cd "${ZORBA_SRC_DIR}" && tar -cf build.tar build ;; esac: - parallel: true - - case $CIRCLE_NODE_INDEX in 1) cd "${ZORBA_SRC_DIR}" && scp -r ubuntu@node0:/home/ubuntu/zorba/build.tar . && tar -xvf build.tar && bash "${ZORBA_SRC_DIR}/import_tests.sh" && cd "${ZORBA_BUILD_DIR}" && make fots-activate-sets ;; 2) cd "${ZORBA_SRC_DIR}" && scp -r ubuntu@node0:/home/ubuntu/zorba/build.tar . && tar -xvf build.tar && bash "${ZORBA_SRC_DIR}/import_tests.sh" && cd "${ZORBA_BUILD_DIR}" && make fots-activate-sets ;; 3) cd "${ZORBA_SRC_DIR}" && scp -r ubuntu@node0:/home/ubuntu/zorba/build.tar . && tar -xvf build.tar && bash "${ZORBA_SRC_DIR}/import_tests.sh" && cd "${ZORBA_BUILD_DIR}" && make fots-activate-sets ;; esac: - parallel: true + - case $CIRCLE_NODE_INDEX in 0) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "enable-extra-tests" ;; 1) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "enable-extra-tests" ;; 2) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivid" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivid" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivid" "enable-extra-tests" ;; 3) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "enable-extra-tests" ;; esac: + parallel: true override: - - case $CIRCLE_NODE_INDEX in 0) cd "${ZORBA_BUILD_DIR}" && env QTTEST=42 QTTEST2=other QTTESTEMPTY='' ctest -j2 -T Test -I 1,2250 -E "${EXCLUDE_MODULES}" --output-on-failure ;; 1) cd "${ZORBA_BUILD_DIR}" && env QTTEST=42 QTTEST2=other QTTESTEMPTY='' ctest -j2 -T Test -I 2251,4500 -E "${EXCLUDE_MODULES}" --output-on-failure ;; 2) cd "${ZORBA_BUILD_DIR}" && env QTTEST=42 QTTEST2=other QTTESTEMPTY='' ctest -j2 -T Test -I 4501,6750 -E "${EXCLUDE_MODULES}" --output-on-failure ;; 3) cd "${ZORBA_BUILD_DIR}" && env QTTEST=42 QTTEST2=other QTTESTEMPTY='' ctest -j2 -T Test -I 6751 -E "${EXCLUDE_MODULES}" --output-on-failure ;; esac: + - case $CIRCLE_NODE_INDEX in 0) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 1) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 2) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivd" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 3) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "ctest" "-E" "${EXCLUDE_MODULES}" ;; esac: parallel: true timeout: 600 diff --git a/docker/zorba-test/build.sh b/docker/zorba-test/build.sh new file mode 100755 index 0000000000..d914284745 --- /dev/null +++ b/docker/zorba-test/build.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +if [ "$#" -ne 1 ] +then + echo "No version specified, use for instance: ./build.sh precise" + exit 1 +fi + +FOLDER=$1 +NAME=zorba-test-$FOLDER +BUILD_FOLDER=build +( + rm -rf $BUILD_FOLDER + mkdir $BUILD_FOLDER + cp docker-entrypoint.sh $BUILD_FOLDER/docker-entrypoint.sh + cp $FOLDER/Dockerfile $BUILD_FOLDER/Dockerfile + cd $BUILD_FOLDER + + set +e + docker stop "$NAME" > /dev/null 2>&1 + docker rm "$NAME" > /dev/null 2>&1 + set -e + + docker build -t "$NAME" . +) diff --git a/docker/zorba-test/docker-entrypoint.sh b/docker/zorba-test/docker-entrypoint.sh new file mode 100755 index 0000000000..b665b243e6 --- /dev/null +++ b/docker/zorba-test/docker-entrypoint.sh @@ -0,0 +1,52 @@ +#!/bin/bash +set -e + +function show_usage() +{ + echo "No action specified. Allowed actions are:" + echo "ssh - to start an ssh server (requires running docker in detached mode (-d))" + echo "cmake - to prepare for the build of zorba" + echo "make - to build zorba" + echo "enable-extra-tests - to enable fots tests" + echo "ctest ... - to run the test suite. Extra arguments are passed to ctest" +} + +if [ "$#" -eq "0" ] +then + show_usage + exit 1 +fi + +ACTION=$1 +case "$ACTION" in + ssh) + /usr/sbin/sshd -D + ;; + cmake) + rm -rf /zorba/build + mkdir /zorba/build + cd /zorba/build + cmake -DZORBA_MODULES_DIR="/zorba/zorba_modules" -DZORBA_XQUERYX:BOOL=1 -DZORBA_TEST_XQUERYX:BOOL=1 -DZORBA_WITH_BIG_INTEGER=1 -DCMAKE_BUILD_TYPE=Release -DZORBA_TEST_PLAN_SERIALIZATION:BOOL=1 -DZORBATEST_USE_MT_XQTS:BOOL=1 "/zorba/zorba" + ;; + make) + cd /zorba/build + make -j8 + ;; + enable-extra-tests) + cd /zorba/build + /zorba/zorba/import_tests.sh /zorba/zorba /zorba/build + make fots-activate-sets + ;; + ctest) + cd /zorba/build + env QTTEST=42 QTTEST2=other QTTESTEMPTY='' ctest -j2 -T Test --output-on-failure ${@:2} + ;; + help) + show_usage + exit 0 + ;; + *) + show_usage + exit 1 + ;; +esac \ No newline at end of file diff --git a/docker/zorba-test/precise/Dockerfile b/docker/zorba-test/precise/Dockerfile new file mode 100644 index 0000000000..9da281b6f4 --- /dev/null +++ b/docker/zorba-test/precise/Dockerfile @@ -0,0 +1,73 @@ +FROM ubuntu:precise + +MAINTAINER Federico Cavalieri + +RUN apt-get update -y +RUN apt-get install python-software-properties -y +RUN add-apt-repository ppa:fcavalieri/zorba -y +RUN apt-get update -y + +#Prerequisites +# - Utils +RUN apt-get install git wget -y + +# - Build +RUN apt-get install build-essential cmake -y + +# - Zorba Core +RUN apt-get install libxml2-dev libicu-dev uuid-dev libxerces-c-dev libxslt-dev libcurl4-openssl-dev openjdk-7-jdk -y + +# - Documentation +RUN apt-get install doxygen texlive -y + +# - Lexer and Parser +RUN apt-get install m4 -y + +RUN wget http://launchpadlibrarian.net/160037457/bison_3.0.2.dfsg-2_amd64.deb +RUN wget http://launchpadlibrarian.net/160037458/libbison-dev_3.0.2.dfsg-2_amd64.deb +RUN dpkg -i libbison-dev_3.0.2.dfsg-2_amd64.deb bison_3.0.2.dfsg-2_amd64.deb +RUN rm libbison-dev_3.0.2.dfsg-2_amd64.deb bison_3.0.2.dfsg-2_amd64.deb + +RUN wget https://launchpad.net/ubuntu/+source/flex/2.5.39-8/+build/6118519/+files/libfl-dev_2.5.39-8_amd64.deb +RUN wget https://launchpad.net/ubuntu/+source/flex/2.5.39-8/+build/6118519/+files/flex_2.5.39-8_amd64.deb +RUN dpkg -i libfl-dev_2.5.39-8_amd64.deb flex_2.5.39-8_amd64.deb +RUN rm libfl-dev_2.5.39-8_amd64.deb flex_2.5.39-8_amd64.deb + +# - MT Testdriver: +RUN apt-get install libboost-filesystem-dev libboost-system-dev -y + +# - External Modules: +RUN apt-get install libfop-java graphviz-dev libtidy-dev libarchive-dev libmagick++-dev libgeos++-dev libsqlite3-dev libpdfbox-java libfontbox-java libjempbox-java xmlbeans -y + +#- NoSQL External Module: +RUN wget http://download.oracle.com/otn-pub/otn_software/nosql-database/kv-c-driver_3.3.5-0_amd64.deb +RUN dpkg -i kv-c-driver_3.3.5-0_amd64.deb +RUN rm kv-c-driver_3.3.5-0_amd64.deb + +# Couchbase External Module: +RUN wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1204.list +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A3FAA648D9223EDA +RUN apt-get update -y +RUN apt-get install libcouchbase-dev -y + +# - Email External Module +RUN apt-get install libc-client2007e-dev libssl-dev libpam-krb5 libkrb5-dev libgssapi-krb5-2 libpam-krb5 libpam-modules libpam0g-dev -y + +# - Purge Legacy Java +RUN apt-get purge openjdk-6-.* -y + +# - Fix Locales +RUN locale-gen de_DE && locale-gen de_DE.UTF-8 && locale-gen fr_FR && locale-gen fr_FR.UTF-8 && update-locale + +#SSH +RUN apt-get install openssh-server -y && \ + mkdir -p /var/run/sshd && \ + /bin/sh -c 'echo root:zorba | chpasswd' + +#Expose +VOLUME /zorba +EXPOSE 22 + +#Entrypoint +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/docker/zorba-test/publish.sh b/docker/zorba-test/publish.sh new file mode 100755 index 0000000000..176bcf429d --- /dev/null +++ b/docker/zorba-test/publish.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +if [ "$#" -ne 1 ] +then + echo "No version specified, use for instance: ./publish.sh precise" + exit 1 +fi + +NAME=zorba-test-$1 +FULL_NAME=fcavalieri/$NAME +docker tag -f $NAME $FULL_NAME +docker push $FULL_NAME diff --git a/docker/zorba-test/trusty/Dockerfile b/docker/zorba-test/trusty/Dockerfile new file mode 100644 index 0000000000..2028b02009 --- /dev/null +++ b/docker/zorba-test/trusty/Dockerfile @@ -0,0 +1,61 @@ +FROM ubuntu:trusty + +MAINTAINER Federico Cavalieri + +RUN apt-get update -y +RUN apt-get install software-properties-common -y +RUN add-apt-repository ppa:fcavalieri/zorba -y +RUN apt-get update -y + +#Prerequisites +# - Utils +RUN apt-get install git wget -y + +# - Build +RUN apt-get install build-essential cmake -y + +# - Zorba Core +RUN apt-get install libxml2-dev libicu-dev uuid-dev libxerces-c-dev libxslt-dev libcurl4-openssl-dev openjdk-7-jdk -y + +# - Documentation +RUN apt-get install doxygen texlive -y + +# - Lexer and Parser +RUN apt-get install m4 bison libbison-dev flex libfl-dev -y + +# - MT Testdriver: +RUN apt-get install libboost-filesystem-dev libboost-system-dev -y + +# - External Modules: +RUN apt-get install libfop-java graphviz-dev libtidy-dev libarchive-dev libmagick++-dev libgeos++-dev libsqlite3-dev libpdfbox-java libfontbox-java libjempbox-java xmlbeans -y + +#- NoSQL External Module: +RUN wget http://download.oracle.com/otn-pub/otn_software/nosql-database/kv-c-driver_3.3.5-0_amd64.deb +RUN dpkg -i kv-c-driver_3.3.5-0_amd64.deb +RUN rm kv-c-driver_3.3.5-0_amd64.deb + +# Couchbase External Module: +RUN wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1404.list +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A3FAA648D9223EDA +RUN apt-get update -y +RUN apt-get install libcouchbase-dev -y + +# - Email External Module +RUN apt-get install libc-client2007e-dev libssl-dev libkrb5-dev libpam0g-dev -y + +# - Fix Locales +RUN locale-gen de_DE && locale-gen de_DE.UTF-8 && locale-gen fr_FR && locale-gen fr_FR.UTF-8 && update-locale + +#SSH +RUN apt-get install openssh-server -y && \ + mkdir -p /var/run/sshd && \ + /bin/sh -c 'echo root:zorba | chpasswd' +RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config + +#Expose +VOLUME /zorba +EXPOSE 22 + +#Entrypoint +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/docker/zorba-test/vivid/Dockerfile b/docker/zorba-test/vivid/Dockerfile new file mode 100644 index 0000000000..66314d958f --- /dev/null +++ b/docker/zorba-test/vivid/Dockerfile @@ -0,0 +1,61 @@ +FROM ubuntu:vivid + +MAINTAINER Federico Cavalieri + +RUN apt-get update -y +RUN apt-get install software-properties-common -y +RUN add-apt-repository ppa:fcavalieri/zorba -y +RUN apt-get update -y + +#Prerequisites +# - Utils +RUN apt-get install git wget -y + +# - Build +RUN apt-get install build-essential cmake -y + +# - Zorba Core +RUN apt-get install libxml2-dev libicu-dev uuid-dev libxerces-c-dev libxslt-dev libcurl4-openssl-dev openjdk-8-jdk -y + +# - Documentation +RUN apt-get install doxygen texlive -y + +# - Lexer and Parser +RUN apt-get install m4 bison libbison-dev flex libfl-dev -y + +# - MT Testdriver: +RUN apt-get install libboost-filesystem-dev libboost-system-dev -y + +# - External Modules: +RUN apt-get install libfop-java graphviz-dev libtidy-dev libarchive-dev libmagick++-dev libgeos++-dev libsqlite3-dev libpdfbox-java libfontbox-java libjempbox-java xmlbeans -y + +#- NoSQL External Module: +RUN wget http://download.oracle.com/otn-pub/otn_software/nosql-database/kv-c-driver_3.3.5-0_amd64.deb +RUN dpkg -i kv-c-driver_3.3.5-0_amd64.deb +RUN rm kv-c-driver_3.3.5-0_amd64.deb + +# Couchbase External Module: +RUN wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1404.list +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A3FAA648D9223EDA +RUN apt-get update -y +RUN apt-get install libcouchbase-dev -y + +# - Email External Module +RUN apt-get install libc-client2007e-dev libssl-dev libkrb5-dev libpam0g-dev -y + +# - Fix Locales +RUN locale-gen de_DE && locale-gen de_DE.UTF-8 && locale-gen fr_FR && locale-gen fr_FR.UTF-8 && update-locale + +#SSH +RUN apt-get install openssh-server -y && \ + mkdir -p /var/run/sshd && \ + /bin/sh -c 'echo root:zorba | chpasswd' +RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config + +#Expose +VOLUME /zorba +EXPOSE 22 + +#Entrypoint +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/docker/zorba-test/wily/Dockerfile b/docker/zorba-test/wily/Dockerfile new file mode 100644 index 0000000000..0a9e0c41ca --- /dev/null +++ b/docker/zorba-test/wily/Dockerfile @@ -0,0 +1,61 @@ +FROM ubuntu:wily + +MAINTAINER Federico Cavalieri + +RUN apt-get update -y +RUN apt-get install software-properties-common -y +RUN add-apt-repository ppa:fcavalieri/zorba -y +RUN apt-get update -y + +#Prerequisites +# - Utils +RUN apt-get install git wget -y + +# - Build +RUN apt-get install build-essential cmake -y + +# - Zorba Core +RUN apt-get install libxml2-dev libicu-dev uuid-dev libxerces-c-dev libxslt-dev libcurl4-openssl-dev openjdk-8-jdk -y + +# - Documentation +RUN apt-get install doxygen texlive -y + +# - Lexer and Parser +RUN apt-get install m4 bison libbison-dev flex libfl-dev -y + +# - MT Testdriver: +RUN apt-get install libboost-filesystem-dev libboost-system-dev -y + +# - External Modules: +RUN apt-get install libfop-java graphviz-dev libtidy-dev libarchive-dev libmagick++-dev libgeos++-dev libsqlite3-dev libpdfbox-java libfontbox-java libjempbox-java xmlbeans -y + +#- NoSQL External Module: +RUN wget http://download.oracle.com/otn-pub/otn_software/nosql-database/kv-c-driver_3.3.5-0_amd64.deb +RUN dpkg -i kv-c-driver_3.3.5-0_amd64.deb +RUN rm kv-c-driver_3.3.5-0_amd64.deb + +# Couchbase External Module: +RUN wget -O/etc/apt/sources.list.d/couchbase.list http://packages.couchbase.com/ubuntu/couchbase-ubuntu1404.list +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A3FAA648D9223EDA +RUN apt-get update -y +RUN apt-get install libcouchbase-dev -y + +# - Email External Module +RUN apt-get install libc-client2007e-dev libssl-dev libkrb5-dev libpam0g-dev -y + +# - Fix Locales +RUN locale-gen de_DE && locale-gen de_DE.UTF-8 && locale-gen fr_FR && locale-gen fr_FR.UTF-8 && update-locale + +#SSH +RUN apt-get install openssh-server -y && \ + mkdir -p /var/run/sshd && \ + /bin/sh -c 'echo root:zorba | chpasswd' +RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config + +#Expose +VOLUME /zorba +EXPOSE 22 + +#Entrypoint +COPY docker-entrypoint.sh /docker-entrypoint.sh +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/docker/Dockerfile b/docker/zorba/Dockerfile similarity index 100% rename from docker/Dockerfile rename to docker/zorba/Dockerfile diff --git a/import_tests.sh b/import_tests.sh old mode 100644 new mode 100755 index fe0f5143e6..adaf41bb94 --- a/import_tests.sh +++ b/import_tests.sh @@ -1,14 +1,29 @@ -"${ZORBA_SRC_DIR}/test/rbkt/Scripts/w3c/import_w3c_testsuite.sh" --builddir "${ZORBA_BUILD_DIR}" "${ZORBA_SRC_DIR}" & -"${ZORBA_SRC_DIR}/test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh" --builddir "${ZORBA_BUILD_DIR}" "${ZORBA_SRC_DIR}" & -"${ZORBA_SRC_DIR}/test/update/Scripts/import_w3c_update_testsuite.sh" --builddir "${ZORBA_BUILD_DIR}" "${ZORBA_SRC_DIR}" & -cmake -D ZORBA="${ZORBA_BUILD_DIR}/bin/zorba" -D BUILDDIR="${ZORBA_BUILD_DIR}" -P "${ZORBA_SRC_DIR}/test/fots/ImportFOTS.cmake" & +#!/bin/bash +function show_usage() +{ + echo "import_tests.sh " +} + +if [ "$#" -ne "2" ] +then + show_usage + exit 1 +fi + +SOURCE_DIR="$1" +BUILD_DIR="$2" + +"${SOURCE_DIR}/test/rbkt/Scripts/w3c/import_w3c_testsuite.sh" --builddir "${BUILD_DIR}" "${SOURCE_DIR}" & +"${SOURCE_DIR}/test/rbkt/Scripts/w3c/import_w3c_full_text_testsuite.sh" --builddir "${BUILD_DIR}" "${SOURCE_DIR}" & +"${SOURCE_DIR}/test/update/Scripts/import_w3c_update_testsuite.sh" --builddir "${BUILD_DIR}" "${SOURCE_DIR}" & +cmake -D ZORBA="${BUILD_DIR}/bin/zorba" -D BUILDDIR="${BUILD_DIR}" -P "${SOURCE_DIR}/test/fots/ImportFOTS.cmake" & FAIL=0 for job in `jobs -p` do wait $job || let "FAIL+=1" done - + if [ $FAIL != "0" ] then exit 1 From 5de95d3792f0f17043d9e1f87a1892cb3710167a Mon Sep 17 00:00:00 2001 From: Federico Cavalieri Date: Wed, 30 Dec 2015 17:54:03 +0100 Subject: [PATCH 2/5] Fixed circle.yml --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index cbfbfb2bd5..0b38ca46a2 100644 --- a/circle.yml +++ b/circle.yml @@ -13,9 +13,9 @@ dependencies: - mkdir -p "${ZORBA_BUILD_DIR}" test: pre: - - case $CIRCLE_NODE_INDEX in 0) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "enable-extra-tests" ;; 1) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "enable-extra-tests" ;; 2) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivid" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivid" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivid" "enable-extra-tests" ;; 3) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "cmake" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "make" && docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "enable-extra-tests" ;; esac: + - case $CIRCLE_NODE_INDEX in 0) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "enable-extra-tests" ;; 1) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "enable-extra-tests" ;; 2) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "enable-extra-tests" ;; 3) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "enable-extra-tests" ;; esac: parallel: true override: - - case $CIRCLE_NODE_INDEX in 0) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-precise" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 1) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-trusty" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 2) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-vivd" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 3) docker run -v /home/ubuntu:/zorba "fcavalieri/zorba-test-wily" "ctest" "-E" "${EXCLUDE_MODULES}" ;; esac: + - case $CIRCLE_NODE_INDEX in 0) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 1) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 2) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivd" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 3) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "ctest" "-E" "${EXCLUDE_MODULES}" ;; esac: parallel: true timeout: 600 From af073e87d4084bc528884f41cc1b953026c51ea6 Mon Sep 17 00:00:00 2001 From: Federico Cavalieri Date: Wed, 30 Dec 2015 18:00:02 +0100 Subject: [PATCH 3/5] Fixed circle.yml --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 0b38ca46a2..b5aa033606 100644 --- a/circle.yml +++ b/circle.yml @@ -14,7 +14,7 @@ dependencies: test: pre: - case $CIRCLE_NODE_INDEX in 0) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "enable-extra-tests" ;; 1) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "enable-extra-tests" ;; 2) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "enable-extra-tests" ;; 3) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "enable-extra-tests" ;; esac: - parallel: true + parallel: true override: - case $CIRCLE_NODE_INDEX in 0) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 1) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 2) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivd" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 3) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "ctest" "-E" "${EXCLUDE_MODULES}" ;; esac: parallel: true From 34329c8250923020f744f27da1443e4607380064 Mon Sep 17 00:00:00 2001 From: Federico Cavalieri Date: Thu, 31 Dec 2015 07:28:47 +0100 Subject: [PATCH 4/5] Update circle.yml --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index b5aa033606..4f595adbb0 100644 --- a/circle.yml +++ b/circle.yml @@ -16,6 +16,6 @@ test: - case $CIRCLE_NODE_INDEX in 0) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "enable-extra-tests" ;; 1) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "enable-extra-tests" ;; 2) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "enable-extra-tests" ;; 3) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "cmake" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "make" && docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "enable-extra-tests" ;; esac: parallel: true override: - - case $CIRCLE_NODE_INDEX in 0) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 1) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 2) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivd" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 3) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "ctest" "-E" "${EXCLUDE_MODULES}" ;; esac: + - case $CIRCLE_NODE_INDEX in 0) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-precise" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 1) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-trusty" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 2) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-vivid" "ctest" "-E" "${EXCLUDE_MODULES}" ;; 3) docker run -v "/home/ubuntu:/zorba" "fcavalieri/zorba-test-wily" "ctest" "-E" "${EXCLUDE_MODULES}" ;; esac: parallel: true timeout: 600 From a45822046c387437f8fb8d06feebe98446bd19d8 Mon Sep 17 00:00:00 2001 From: Federico Cavalieri Date: Thu, 31 Dec 2015 07:48:14 +0100 Subject: [PATCH 5/5] Update circle.yml --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index 4f595adbb0..10a9824f61 100644 --- a/circle.yml +++ b/circle.yml @@ -3,7 +3,7 @@ machine: ZORBA_SRC_DIR: /home/ubuntu/zorba ZORBA_BUILD_DIR: /home/ubuntu/build ZORBA_MODULE_DIR: /home/ubuntu/zorba_modules - EXCLUDE_MODULES: "^zorba_info-extraction_module|conversion/currency-convert|zorba_couchbase_module|zorba_read-pdf_module|zorba_image_module|zorba_data-formatting_module" + EXCLUDE_MODULES: "^zorba_info-extraction_module|conversion/currency-convert|zorba_couchbase_module|zorba_read-pdf_module|zorba_image_module|zorba_data-formatting_module|zorba_nosqldb_module" services: - docker dependencies: