libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [1/3] libcloud git commit: Run tests in a docker container
Date Thu, 16 Apr 2015 17:54:06 GMT
Repository: libcloud
Updated Branches:
  refs/heads/trunk 407fce9e3 -> ccc53c520


Run tests in a docker container

Closes #504

Signed-off-by: Tomaz Muraus <tomaz@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/27070b69
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/27070b69
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/27070b69

Branch: refs/heads/trunk
Commit: 27070b69495ad5d67caca5fae009984612c24fe7
Parents: 407fce9
Author: Matthias Wiesner <matthias.wiesner@googlemail.com>
Authored: Sat Apr 11 00:31:27 2015 +0200
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Thu Apr 16 12:36:11 2015 -0400

----------------------------------------------------------------------
 .dockerignore        | 23 +++++++++++++++++++++++
 contrib/Dockerfile   | 38 ++++++++++++++++++++++++++++++++++++++
 contrib/run_tests.sh | 30 ++++++++++++++++++++++++++++++
 tox.ini              |  2 +-
 4 files changed, 92 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/27070b69/.dockerignore
----------------------------------------------------------------------
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..d768695
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,23 @@
+*.py[co]
+*.sw[po]
+libcloud/test/secrets.py
+demos/secrets.py
+*~
+.tox
+_trial_temp
+build
+MANIFEST
+/.ropeproject/config.py
+/.coverage
+coverage_html_report/
+.idea
+dist/*apache-libcloud*
+dist/*apache_libcloud*
+docs/apidocs/*
+_build/
+apache_libcloud.egg-info/
+.project
+.pydevproject
+.settings
+.git*
+Dockerfile*

http://git-wip-us.apache.org/repos/asf/libcloud/blob/27070b69/contrib/Dockerfile
----------------------------------------------------------------------
diff --git a/contrib/Dockerfile b/contrib/Dockerfile
new file mode 100644
index 0000000..57f27bb
--- /dev/null
+++ b/contrib/Dockerfile
@@ -0,0 +1,38 @@
+FROM ubuntu:14.04
+
+RUN set -e && \
+  apt-get update && \
+  apt-get install -y \
+    software-properties-common \
+    wget \
+    ssh && \
+  add-apt-repository ppa:fkrull/deadsnakes && \
+  apt-get update && \
+  apt-get -y install \
+    python2.6 \
+    python2.7 \
+    python3.2 \
+    python3.3 \
+    python3.4 \
+    python-dev \
+    python2.6-dev \
+    python2.7-dev \
+    python3.2-dev \
+    python3.3-dev \
+    python3.4-dev \
+    python-pip
+
+RUN set -e && \
+  wget https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux64.tar.bz2 && \
+  tar xf ./pypy-2.5.0-linux64.tar.bz2 -C /opt && \
+  ln -s /opt/pypy-2.5.0-linux64/bin/pypy /usr/local/bin/pypy
+
+RUN set -e && \
+  pip install tox \
+    mock \
+    lockfile \
+    coverage
+
+COPY . /libcloud
+WORKDIR /libcloud
+CMD tox

http://git-wip-us.apache.org/repos/asf/libcloud/blob/27070b69/contrib/run_tests.sh
----------------------------------------------------------------------
diff --git a/contrib/run_tests.sh b/contrib/run_tests.sh
new file mode 100755
index 0000000..dc7efa3
--- /dev/null
+++ b/contrib/run_tests.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+# The script needs docker to be installed.
+#
+# Script which builds a testing docker image and container,
+# install the necessary packages: pypy, pip, python versions
+# 2.6, 2.7, 3.2, 3.3, 3.4 (corresponding dev packages as well)
+# and run the tox tests within the container.
+# The script has to be run from libcloud root.
+
+set -e
+docker build -f contrib/Dockerfile -t libcloud_runtest_img .
+docker run --rm --name libcloud_runtest_instance libcloud_runtest_img

http://git-wip-us.apache.org/repos/asf/libcloud/blob/27070b69/tox.ini
----------------------------------------------------------------------
diff --git a/tox.ini b/tox.ini
index e612f5f..cb05e43 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = py25,py26,py27,pypy,py32,py33,py34,lint
+envlist = py26,py27,pypy,py32,py33,py34,lint
 setenv =
     PIP_USE_MIRRORS=1
 


Mime
View raw message