Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
7c43a19f
Commit
7c43a19f
authored
Oct 28, 2020
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/slapos-testing: use nxdtest WIP
parent
0150e946
Pipeline
#12042
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
35 deletions
+51
-35
software/slapos-testing/buildout.hash.cfg
software/slapos-testing/buildout.hash.cfg
+1
-1
software/slapos-testing/instance.cfg
software/slapos-testing/instance.cfg
+47
-29
software/slapos-testing/software.cfg
software/slapos-testing/software.cfg
+3
-5
No files found.
software/slapos-testing/buildout.hash.cfg
View file @
7c43a19f
...
@@ -15,4 +15,4 @@
...
@@ -15,4 +15,4 @@
[template]
[template]
filename = instance.cfg
filename = instance.cfg
md5sum =
a04806bdebd611c7f6698b4bef7af70d
md5sum =
85c8a91bd83e1a54bf48f5ab27dd3daa
software/slapos-testing/instance.cfg
View file @
7c43a19f
[buildout]
[buildout]
extends = ${nxdtest-instance.cfg:rendered}
parts =
parts =
phantomjs-wrapper
runTestSuite
slapos-test-runner
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
@@ -21,6 +21,9 @@ bin = $${buildout:directory}/bin
...
@@ -21,6 +21,9 @@ bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
etc = $${buildout:directory}/etc
services = $${:etc}/run
services = $${:etc}/run
srv = $${buildout:directory}/srv
srv = $${buildout:directory}/srv
var = $${buildout:directory}/var
nxdtest-working-dir = $${:var}/nxdtest
[download-source]
[download-source]
recipe = slapos.recipe.build:gitclone
recipe = slapos.recipe.build:gitclone
...
@@ -71,30 +74,45 @@ repository = ${slapos.toolbox-repository:location}
...
@@ -71,30 +74,45 @@ repository = ${slapos.toolbox-repository:location}
repository = ${slapos.rebootstrap-repository:location}
repository = ${slapos.rebootstrap-repository:location}
[slapos-test-runner]
[slapos-test-runner-nxdtest-environment.sh]
recipe = slapos.cookbook:wrapper
recipe = slapos.recipe.template:jinja2
wrapper-path = $${create-directory:bin}/runTestSuite
rendered = $${create-directory:etc}/$${:_buildout_section_name_}
command-line =
template = inline:
${buildout:bin-directory}/runTestSuite
export PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${buildout:bin-directory}:$PATH
--python_interpreter=${buildout:bin-directory}/${eggs:interpreter}
export SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random}
--source_code_path_list=$${kedifa:location},$${caucase:location},$${erp5.util:location},$${slapos.cookbook:location},$${slapos.core:location},$${slapos.recipe.build:location},$${slapos.recipe.cmmi:location},$${slapos.recipe.template:location},$${slapos.toolbox:location},$${slapos.libnetworkcache:location},$${slapos.rebootstrap:location}
export SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random}
# Notes about environment:
# * slapos.cookbook:wrapper does not seem to allow "extending" PATH. Tests
[slapos-test-runner-dot-nxdtest]
# needs ping, which is a setuid binary that cannot be installed via slapos
recipe = slapos.recipe.template:jinja2
# way of building software without root access, so we keep "standard"
rendered = $${:workdir}/.nxdtest
# /usr/bin and /bin in $PATH
workdir = $${create-directory:nxdtest-working-dir}
# * SLAPOS_TEST_environment is safe to be used by tests, but there is no
template = inline:
# guarantee about free ports on IPV4 and IPV6
{% for test in tests.splitlines() %}
# * LOCAL_IPV4 is backward compatible, to be migrated, SLAPOS_TEST_IPV4
# TODO: wrong summary ?
environment =
# TODO: include .nxdtest from tested repository ?
PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${buildout:bin-directory}:/usr/bin/:/bin/
# if we want for some repositories to have more complex
LOCAL_IPV4=$${slap-configuration:ipv4-random}
# test scenarios (run linter, etc) way may want to define this
SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random}
# with a .nxdtest file in this repository and not here in a central place ?
SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random}
# XXX debug: {{ test }}
TestCase( """{{ test.split()[0] }}""", [ 'python', '-m', 'unittest', '--', 'discover'], cwd="""{{ test.split()[1] }}""", summaryf=PyTest.summary)
{% endfor %}
[phantomjs-wrapper]
recipe = slapos.cookbook:wrapper
context =
command-line = ${phantomjs:location}/phantomjs-slapos
key tests :tests
wrapper-path = $${create-directory:bin}/phantomjs
tests =
kedifa $${kedifa:location}
caucase $${caucase:location}
erp5.util $${erp5.util:location}
slapos.cookbook $${slapos.cookbook:location}
slapos.core $${slapos.core:location}
slapos.recipe.build $${slapos.recipe.build:location}
slapos.recipe.cmmi $${slapos.recipe.cmmi:location}
slapos.recipe.template $${slapos.recipe.template:location}
slapos.toolbox $${slapos.toolbox:location}
slapos.libnetworkcache $${slapos.libnetworkcache:location}
slapos.rebootstrap $${slapos.rebootstrap:location}
[runTestSuite]
env.sh = $${slapos-test-runner-nxdtest-environment.sh:rendered}
workdir = $${slapos-test-runner-dot-nxdtest:workdir}
software/slapos-testing/software.cfg
View file @
7c43a19f
...
@@ -14,6 +14,7 @@ extends =
...
@@ -14,6 +14,7 @@ extends =
../../component/lmsensors/buildout.cfg
../../component/lmsensors/buildout.cfg
../../component/rsync/buildout.cfg
../../component/rsync/buildout.cfg
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/nxdtest.cfg
./buildout.hash.cfg
./buildout.hash.cfg
parts =
parts =
...
@@ -120,14 +121,11 @@ eggs =
...
@@ -120,14 +121,11 @@ eggs =
${slapos.rebootstrap-setup:egg}
${slapos.rebootstrap-setup:egg}
zope.testing
zope.testing
supervisor
supervisor
entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite
scripts =
scripts =
runTestSuite
slapos
slapos
supervisord
supervisord
interpreter=
interpreter
=
python
_for_test
python
[git-clone-repository]
[git-clone-repository]
recipe = slapos.recipe.build:gitclone
recipe = slapos.recipe.build:gitclone
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment