# NEO test software-release
#
# This software-release prepares environment so that neotest NEO
# testing/benchmarking can be run in a SlapOS WebRunner.
[buildout]
extends =
    buildout.hash.cfg
    ../../stack/slapos.cfg
    ../neoppod/software-common.cfg
    ../../component/golang/buildout.cfg
    ../../component/sqlite3/buildout.cfg
    ../../component/zlib/buildout.cfg
    ../../component/wendelin.core/buildout.cfg
    ../../component/ethtool/buildout.cfg
    ../../component/ioping/buildout.cfg
    ../../component/lmbench/buildout.cfg
    ../../component/coreutils/buildout.cfg
    ../../component/util-linux/buildout.cfg
    ../../component/pygolang/buildout.cfg
    ../../stack/nxdtest.cfg


parts =
    gowork
    lmbench
    ioping
    ethtool

#   neotest uses realpath & friends
    coreutils
#   ----//---- lsblk
    util-linux

    neoppod-develop
    neoppod
    wendelin.core
    scripts

# for ZEO scripts (runzeo)
    ZEO/scripts

    neotest-python
    neotest-env.sh
    neotest

#   for instance
    slapos-cookbook
    instance.cfg


[neo]
<= go-git-package
go.importpath = lab.nexedi.com/kirr/neo
repository    = https://lab.nexedi.com/kirr/neo.git
revision      = v1.12-3107-gf278d611

[goperf]
<= go-git-package
go.importpath = golang.org/x/perf
repository    = https://lab.nexedi.com/kirr/go.perf.git
revision      = e8bebf9314da

# go programs to install
[gowork]
install =
    ${neo:location}/go:./...
    ${goperf:location}:./cmd/benchstat

cpkgpath =
    ${sqlite3:location}/lib/pkgconfig
    ${zlib:location}/lib/pkgconfig

# dev-install neo from go checkout
[neoppod-develop]
setup   = ${neo:location}


# neotest-env.sh + neotest wrapper
[buildout-template]
recipe  = slapos.recipe.template
url     = ${:_profile_base_location_}/${:filename}
output  = ${buildout:directory}/${:_buildout_section_name_}

[neotest-env.sh]
<= buildout-template

[neotest]
<= buildout-template
output  = ${buildout:bin-directory}/${:_buildout_section_name_}
mode    = 0755


# instance to run nxdtest.
[instance.cfg]
<= jinja2-template
inline =
  [buildout]
  extends = ${nxdtest-instance.cfg:output}
  parts += tnxdtest

  [runTestSuite]
  env.sh  = ${neotest-env.sh:output}
  workdir = $${directory:t}

  [directory]
  t = $${:home}/t

  # instance/t/.nxdtest -> .nxdtest inside go/neo
  [tnxdtest]
  recipe = plone.recipe.command
  stop-on-error = yes
  command = ln -s -t $${directory:t} ${neo:location}/go/neo/t/.nxdtest



# bin/python is preinstalled with sys.path to wendelin.core & friends.
[neotest-python]
<= python-interpreter
eggs +=
    ${wendelin.core:egg}
    ${neoppod:eggs}
# for instance
    plone.recipe.command

[scripts]
recipe  = zc.recipe.egg:scripts
eggs    =
# to install not only wendelin.core modules but also scripts
    ${wendelin.core:egg}


# ping eggs versions
[versions]
zope.testing = 4.6.2
