[buildout]
parts =
  slapos-test-runner

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
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}

[download-source]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git

[slapos]
<= download-source
repository = ${slapos-repository:location}

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

[slapos-test-runner]
recipe = slapos.cookbook:wrapper
wrapper-path = $${create-directory:bin}/runTestSuite
command-line =
  ${buildout:bin-directory}/runTestSuite
  --python_interpreter=${buildout:bin-directory}/${eggs:interpreter}
  --source_code_path_list=$${slapos:location}/software/caddy-frontend/test

# XXX slapos.cookbook:wrapper does not allow extending env, so we add some default $PATH entries ( not sure they are needed )
environment =
  PATH=${quic_client-bin:location}:${curl:location}/bin/:/usr/bin/:/bin
  LOCAL_IPV4=$${slap-configuration:ipv4-random}
  SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random}
  GLOBAL_IPV6=$${slap-configuration:ipv6-random}
  SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random}
  SLAPOS_TEST_WORKING_DIR=$${create-directory:working-dir}
  TEST_SR=${template:test_software_release}
  SLAPOS_TEST_SR=${template:test_software_release}
