[buildout]
extends =
  ../../stack/slapos.cfg
parts =
  slapos-cookbook
  template

[slapos.buildout-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/slapos.buildout.git
git-executable = ${git:location}/bin/git

[runTestSuite_py]
recipe = zc.recipe.egg
eggs = erp5.util
  zc.buildout
scripts = ${:interpreter}
interpreter = ${:_buildout_section_name_}

[template]
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template =
  inline:
  [buildout]
  eggs-directory = ${buildout:eggs-directory}
  develop-eggs-directory = ${buildout:develop-eggs-directory}
  parts = runTestSuite

  [slap-configuration]
  recipe = slapos.cookbook:slapconfiguration.serialised
  computer = $${slap-connection:computer-id}
  partition = $${slap-connection:partition-id}
  url = $${slap-connection:server-url}
  key = $${slap-connection:key-file}
  cert = $${slap-connection:cert-file}

  [directory]
  recipe = slapos.cookbook:mkdirectory
  bin = $${buildout:directory}/bin
  tmp = $${buildout:directory}/tmp

  [slapos.buildout-repository]
  recipe = slapos.recipe.build:gitclone
  repository = ${slapos.buildout-repository:location}
  git-executable = ${git:location}/bin/git
  shared = true

  [runTestSuite]
  recipe = slapos.recipe.template:jinja2
  rendered = $${directory:bin}/$${:_buildout_section_name_}
  template = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
  mode = 0755
  context =
    key slapparameter_dict slap-configuration:configuration
    key slapos_buildout slapos.buildout-repository:location
    key temp_directory directory:tmp
    raw runTestSuite_py ${buildout:bin-directory}/${runTestSuite_py:interpreter}

[versions]
slapos.recipe.template = 4.3