From 2f34a0e792cbce6d3d5292d85ba259731b6cad0a Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Wed, 26 Feb 2014 15:23:12 +0100
Subject: [PATCH] slapos-testing: Merge jio and officejs tests on
 slapos-testing

---
 software/slapos-testing/instance.cfg | 19 +++++++++++++++++++
 software/slapos-testing/software.cfg | 20 +++++++++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/software/slapos-testing/instance.cfg b/software/slapos-testing/instance.cfg
index facea35b3..19645dc22 100644
--- a/software/slapos-testing/instance.cfg
+++ b/software/slapos-testing/instance.cfg
@@ -2,6 +2,7 @@
 parts =
   slapos.core-setup
   erp5.util-setup
+  phantomjs-wrapper
   slapos-test-runner
   sh-environment
 
@@ -48,6 +49,14 @@ recipe = plone.recipe.command
 command = echo "Updating setup...";cd $${erp5-util:location}; export PATH="$${slapos-test-runner:prepend-path}:$PATH"; export CPPFLAGS="$${environment:CPPFLAGS}"; export LDFLAGS="$${environment:LDFLAGS}"; export PYTHONPATH="$${environment:PYTHONPATH}"; python setup.py test -n; python setup.py test -n; python setup.py test -n; python setup.py test -n; python setup.py test -n 
 update-command = $${:command}
 
+[officejs]
+<= download-source
+repository = ${officejs-repository:location}
+
+[jio]
+<= download-source
+repository = ${jio-repository:location}
+
 [slapos-test-runner]
 recipe = slapos.cookbook:egg_test
 run-test-suite = $${create-directory:bin}/runTestSuite
@@ -60,6 +69,8 @@ test-list =
   $${slapos.recipe.template:location}
   $${slapos.recipe.build:location}
   $${erp5-util:location}
+  $${jio:location}
+  $${officejs:location}
 prepend-path = ${git:location}/bin:${libxslt:location}/bin:${python2.7:location}/bin
 environment = environment
 
@@ -81,3 +92,11 @@ input = inline:
   export PS1="[slapos-testing env Active] $PS1"
 output = $${create-directory:bin}/environment.sh
 mode = 755
+
+[phantomjs-wrapper]
+recipe = slapos.cookbook:wrapper
+command-line = ${phantomjs:location}/phantomjs-slapos
+wrapper-path = $${directory:bin}/phantomjs
+# XXX we must use "parameters-extra" (- instead of _)
+# when new slapos.cookbook will be used
+parameters_extra = true
diff --git a/software/slapos-testing/software.cfg b/software/slapos-testing/software.cfg
index ea3e67b7e..38f931f9d 100644
--- a/software/slapos-testing/software.cfg
+++ b/software/slapos-testing/software.cfg
@@ -8,6 +8,7 @@ extends =
   ../../component/python-2.7/buildout.cfg
   ../../component/python-setuptools/buildout.cfg
   ../../component/zlib/buildout.cfg
+  ../../component/phantomjs/buildout.cfg
   ../../stack/slapos.cfg
 
 parts =
@@ -16,7 +17,10 @@ parts =
   slapos.recipe.template-repository
   slapos.recipe.build-repository
   erp5-util-repository
+  officejs-repository
+  jio-repository
   eggs
+  phantomjs
   template
 
 [eggs]
@@ -67,10 +71,24 @@ forbid-download-cache = true
 repository = http://git.erp5.org/repos/erp5.git
 branch = master
 
+[officejs-repository]
+recipe = slapos.recipe.build:gitclone
+git-executable = ${git:location}/bin/git
+forbid-download-cache = true
+repository = http://git.erp5.org/repos/officejs.git
+branch = jqs
+
+[jio-repository]
+recipe = slapos.recipe.build:gitclone
+git-executable = ${git:location}/bin/git
+forbid-download-cache = true
+repository = http://git.erp5.org/repos/jio.git
+branch = master
+
 [template]
 recipe = slapos.recipe.template
 url = ${:_profile_base_location_}/instance.cfg
-md5sum = 478ba8c3138a77013e12b50354837bfb
+md5sum = d0f430678b4407af6d6d66c9f2ac5c93
 output =  ${buildout:directory}/template.cfg
 mode = 640
 
-- 
2.30.9