From 82f9e84b86baceaf7ee84eee5b52b23a1ce6b53a Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 28 Mar 2016 15:16:16 +0200 Subject: [PATCH] Only install needed requirements We currently install SBCL on all systems - but only this repository needs it. Also, this repo needs far less packages than we install by default and the version of SBCL that is installed is so out of date that the tests no longer pass. Add an bindep.txt file containing a cross-platform list of dependencies needed for running included tests. Convert SBCL version to one installed by CIM so that we always get an up to date version. This change is self-testing. Related Change: If8b4e412f8ae48c6c0133634df4a95d10a876be3 Change-Id: Ie1ecb184bd825aea4dbb315cf125b991ae22d682 --- bindep.txt | 5 +++++ run-tests.sh | 14 +++++++++++--- update-deps.lisp | 5 +++-- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 bindep.txt diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 0000000..a1f7c16 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,5 @@ +# This is a cross-platform list tracking distribution packages needed by tests; +# see http://docs.openstack.org/infra/bindep/ for additional information. + +build-essential [platform:dpkg] +language-pack-en [platform:dpkg] diff --git a/run-tests.sh b/run-tests.sh index f0defa6..f6b0dff 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -2,9 +2,17 @@ set -e set -x export HOME=$PWD/.test-env -mkdir $HOME +[ -d $HOME ] || mkdir $HOME cd $HOME -wget -q http://beta.quicklisp.org/quicklisp.lisp -O quicklisp.lisp +export CIM_HOME=$HOME +if [ ! -e $HOME/init.sh ]; then + curl -L https://raw.github.com/KeenS/CIM/master/scripts/cim_installer | /bin/sh +fi +source "$CIM_HOME/init.sh" +cim install sbcl || true +cim use sbcl sbcl --script ../update-deps.lisp -ln -s $PWD/.. ~/quicklisp/local-projects/cl-openstack-client +if [ ! -L ~/quicklisp/local-projects/cl-openstack-client ]; then + ln -s $PWD/.. ~/quicklisp/local-projects/cl-openstack-client +fi sbcl --script ../run-tests.lisp diff --git a/update-deps.lisp b/update-deps.lisp index 62f1412..d86d0e9 100644 --- a/update-deps.lisp +++ b/update-deps.lisp @@ -1,5 +1,6 @@ -(load (make-pathname :directory (pathname-directory (user-homedir-pathname)) :name "quicklisp" :type "lisp")) -(quicklisp-quickstart:install) +(load (merge-pathnames "quicklisp/setup.lisp" + (user-homedir-pathname))) + (dolist (file '("../requirements.txt" "../test-requirements.txt")) (with-open-file (s file) (loop for line = (read-line s nil)