Commit f845cbee authored by Kirill Smelkov's avatar Kirill Smelkov

neotest: Actually add instance and teach it to run `neotest bench-local` under...

neotest: Actually add instance and teach it to run `neotest bench-local` under Nexedi testing infrastructure

Commit 31fe231f (neotest: Draft software-release to run NEO/go & friends
tests/benchmarks under webrunner) added "neotest" software release, but
there it added only software supplying - not instantiation - this way
allowing only manual play with neotest.

Recently @rafael approached me saying that one of my webrunner is red on
monitoring because "neotest" software inside fails to instantiate, and
suggested to create a simple instance with bin/runTestSuite inside, so
that this way neotest could be added to a testnode and run on regular
basis by our testing infrastructure.

So here it goes - simple instance with only bin/runTestSuite which tries
to adhere to testnode protocol.

Fixups discovered to be needed while running on testnodes are also included in this merge request.

/reviewed-on nexedi/slapos!282
parents 6eb7a072 5685a461
# TODO instance which runs this test periodically automatically and ingests results to ERP5 # NEO test instance: run neotest under Nexedi testing infrastructure
[buildout]
parts = runTestSuite
# std stuff for slapos instance
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
# software release we instantiate was supplied here
[software]
dir = {{ buildout['directory'] }}
bin = {{ buildout['bin-directory'] }}
# instance directories
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
bin = ${:home}/bin
neotest = ${:home}/neotest
# script to run the testsuite from inside <instance>/neotest/
# located @ <instance>/bin/runTestSuite so testnode can see this as run tests entrypoint.
[runTestSuite]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/${:_buildout_section_name_}
command-line = /bin/bash -c 'cd ${directory:neotest} && ${software:bin}/neotest-runTestSuite "$@"' runTestSuite
# vvv appends "$@" to argv ^^^ without shell-escaping
parameters-extra = true
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
. ${gowork:env.sh} . ${gowork:env.sh}
PATH="${coreutils:location}/bin:$PATH"
PATH="${util-linux:location}/bin:$PATH"
PATH="${ethtool:location}/sbin:$PATH" PATH="${ethtool:location}/sbin:$PATH"
PATH="${ioping:location}/bin:$PATH" PATH="${ioping:location}/bin:$PATH"
PATH="${lmbench:location}/bin:$PATH" PATH="${lmbench:location}/bin:$PATH"
......
#!/bin/bash -e
# neotest's runTestSuite wraper so it could be run without any environment preset
. ${buildout:directory}/neotest-env.sh
exec ${gowork:src}/lab.nexedi.com/kirr/neo/go/neo/t/nxd/runTestSuite "$@"
...@@ -12,6 +12,8 @@ extends = ...@@ -12,6 +12,8 @@ extends =
../../component/ethtool/buildout.cfg ../../component/ethtool/buildout.cfg
../../component/ioping/buildout.cfg ../../component/ioping/buildout.cfg
../../component/lmbench/buildout.cfg ../../component/lmbench/buildout.cfg
../../component/coreutils/buildout.cfg
../../component/util-linux/buildout.cfg
parts = parts =
gowork gowork
...@@ -19,6 +21,11 @@ parts = ...@@ -19,6 +21,11 @@ parts =
ioping ioping
ethtool ethtool
# neotest uses realpath & friends
coreutils
# ----//---- lsblk
util-linux
neoppod-develop neoppod-develop
neoppod neoppod
wendelin.core-dev wendelin.core-dev
...@@ -26,11 +33,12 @@ parts = ...@@ -26,11 +33,12 @@ parts =
neotest-env.sh neotest-env.sh
neotest neotest
neotest-runTestSuite
# for instance # for instance
slapos-deps-eggs slapos-deps-eggs
slapos-cookbook slapos-cookbook
# instance.cfg instance.cfg
# go packages to install (+ automatically their dependencies) # go packages to install (+ automatically their dependencies)
...@@ -53,7 +61,7 @@ output = ${buildout:directory}/${:_buildout_section_name_} ...@@ -53,7 +61,7 @@ output = ${buildout:directory}/${:_buildout_section_name_}
[neotest-env.sh] [neotest-env.sh]
<= buildout-template <= buildout-template
md5sum = 6e2203c7a86e8a3e8e56b8086115f5d4 md5sum = 595eebbbcb56b6a8464d48833cfae57b
[neotest] [neotest]
<= buildout-template <= buildout-template
...@@ -61,11 +69,25 @@ output = ${buildout:bin-directory}/${:_buildout_section_name_} ...@@ -61,11 +69,25 @@ output = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755 mode = 0755
md5sum = fb3b4109128c1db1739ef5bb6abd1d94 md5sum = fb3b4109128c1db1739ef5bb6abd1d94
[neotest-runTestSuite]
<= buildout-template
output = ${buildout:bin-directory}/${:_buildout_section_name_}
mode = 0755
md5sum = 6a4281730b68cdba5c873817a6754428
# instance
[jinja2-template]
recipe = slapos.recipe.template:jinja2
template= ${:_profile_base_location_}/${:_buildout_section_name_}.in
rendered= ${buildout:directory}/${:_buildout_section_name_}
mode = 0644
context =
section buildout buildout
# instance (TODO)
[instance.cfg] [instance.cfg]
<= buildout-template <= jinja2-template
md5sum = 410e1b2d72829824b28cc0299adb472e md5sum = 7bd68ed8842cd25301bf04bcdcef88f6
# eggs: # eggs:
...@@ -80,6 +102,8 @@ eggs = ...@@ -80,6 +102,8 @@ eggs =
wendelin.core wendelin.core
# for ZEO scripts (runzeo) # for ZEO scripts (runzeo)
ZEO ZEO
# for nxd/runTestSuite
erp5.util
# wendelin.core: latest not yet released # wendelin.core: latest not yet released
...@@ -92,6 +116,7 @@ pyasn1 = 0.3.7 ...@@ -92,6 +116,7 @@ pyasn1 = 0.3.7
ZODB3 = 3.11.0 ZODB3 = 3.11.0
numpy = 1.13.3 numpy = 1.13.3
zope.testing = 4.6.2 zope.testing = 4.6.2
erp5.util = 0.4.50
# Required by: # Required by:
# ZEO==4.3.1 # ZEO==4.3.1
...@@ -103,7 +128,3 @@ ZConfig = 3.2.0 ...@@ -103,7 +128,3 @@ ZConfig = 3.2.0
# ZEO==4.3.1 # ZEO==4.3.1
# ZODB==4.4.5 # ZODB==4.4.5
zc.lockfile = 1.2.1 zc.lockfile = 1.2.1
# Required by:
# slapos.toolbox==0.73
erp5.util = 0.4.49
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment