# 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
    gowork.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
    ../../component/numpy/buildout.cfg
    ../../stack/nxdtest.cfg


parts =
    gowork
    lmbench
    ioping
    ethtool

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

    neoppod-develop
    neoppod
    wendelin.core-dev
    eggs

    neotest-env.sh
    neotest

#   for instance
    slapos-cookbook
    instance.cfg


# go packages to install (+ automatically their dependencies)
[gowork]
install =
    lab.nexedi.com/kirr/neo/go/...
    github.com/pkg/profile
    golang.org/x/perf/cmd/benchstat

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

# dev-install neo from go checkout
[neoppod-develop]
setup   = ${go_lab.nexedi.com_kirr_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
template = inline:
  [buildout]
  extends = ${nxdtest-instance.cfg:rendered}
  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} ${gowork:src}/lab.nexedi.com/kirr/neo/go/neo/t/.nxdtest



# eggs:
[eggs]
recipe  = zc.recipe.egg
eggs    =
# wendelin.core still requires ZODB3 but having ZODB4 or 5 installed satisfies latest ZODB3
    ZODB3
# also for wc
    ${numpy:egg}
# to install not only wendelin.core modules but also scripts
    wendelin.core
# for ZEO scripts (runzeo)
    ${ZEO:egg}
# for e.g. tcpu.py
    ${pygolang:egg}
# for instance
    plone.recipe.command


# wendelin.core: latest not yet released
[wendelin.core-repository]
revision= v0.11-15-gf785ac079b

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

# Required by:
# ZEO==4.3.1
# ZODB==4.4.5
# zodburi==2.3.0
ZConfig = 3.2.0

# Required by:
# ZEO==4.3.1
# ZODB==4.4.5
zc.lockfile = 1.2.1

# Required by:
# neoppod==1.8.1
python-dateutil = 2.7.1
