Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos
Commits
a12cd57d
Commit
a12cd57d
authored
May 10, 2022
by
Boxiang Sun
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5testnode: Use nxdtest in depoy-test
parent
bbd44c6d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
20 deletions
+45
-20
software/erp5testnode/testsuite/deploy-test/buildout.hash.cfg
...ware/erp5testnode/testsuite/deploy-test/buildout.hash.cfg
+1
-1
software/erp5testnode/testsuite/deploy-test/instance-deploy-test.cfg.jinja2
...ode/testsuite/deploy-test/instance-deploy-test.cfg.jinja2
+2
-1
software/erp5testnode/testsuite/deploy-test/instance.cfg.in
software/erp5testnode/testsuite/deploy-test/instance.cfg.in
+40
-10
software/erp5testnode/testsuite/deploy-test/software.cfg
software/erp5testnode/testsuite/deploy-test/software.cfg
+2
-8
No files found.
software/erp5testnode/testsuite/deploy-test/buildout.hash.cfg
View file @
a12cd57d
...
...
@@ -18,4 +18,4 @@ md5sum = 8357771b70efd0740561b1cb46f6955e
[template-deploy-test]
filename = instance.cfg.in
md5sum = c5db797980951b764b69aaa4b60a0380
#
md5sum = c5db797980951b764b69aaa4b60a0380
software/erp5testnode/testsuite/deploy-test/instance-deploy-test.cfg.jinja2
View file @
a12cd57d
...
...
@@ -11,7 +11,6 @@
The test_type = "{{ test_type }}" is unsupported.
{% endif -%}
[buildout]
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
...
...
@@ -69,3 +68,5 @@ tmp = ${:home}/tmp/
log = ${:var}/log/
services = ${:etc}/service/
scripts = ${:etc}/run/
test-working-dir = ${:home}/tmp
nxdtest-working-dir = ${:var}/nxdtest
\ No newline at end of file
software/erp5testnode/testsuite/deploy-test/instance.cfg.in
View file @
a12cd57d
[buildout]
extends = ${template:output}
extends =
${nxdtest-instance.cfg:output}
${template:output}
parts +=
runTestSuite
copy-test-data
publish
[copy-test-data]
# Note: This is a hack, as such while requesting KVM it is not possible
...
...
@@ -23,17 +26,29 @@ command =
cp ${standalone-local-playbook:location} $dest/standalone-local-playbook
fi
[
runTestSuite
]
[
deploy-test-nxdtest-environment.sh
]
recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/
bin/$
${:_buildout_section_name_}
rendered = $${buildout:directory}/
etc/
${:_buildout_section_name_}
template = inline:
#!/bin/sh
export PATH=${python2.7-with-eggs:location}:$PATH
exec ${buildout:bin-directory}/${runTestSuite_py:interpreter} ${:_profile_base_location_}/runTestSuite.py --partition_ipv4 {{ list(partition_ipv4)[0] }} --partition_path $${buildout:directory} --test_reference "{{ slapparameter_dict.get('image-to-test-url') }} {{ slapparameter_dict.get('script-to-test-url')}}" --test_location "${test-location:base}/{{ slapparameter_dict.get('test-relative-directory', 'playbook/roles/standalone-shared') }}" --python_interpreter=${buildout:bin-directory}/${runTestSuite_py:interpreter} "$@"
mode = 0755
context =
key slapparameter_dict slap-configuration:configuration
key partition_ipv4 slap-configuration:ipv4
export PATH=$${buildout:bin-directory}:/usr/bin/:/bin
export SLAPOS_TEST_WORKING_DIR=$${buildout:directory}/tmp
export SLAPOS_TEST_LOG_DIRECTORY=$${buildout:directory}/var/log
[deploy-test-dot-nxdtest]
recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/var/nxdtest/.nxdtest
workdir = $${buildout:directory}/var/nxdtest
template = inline:
TestCase(
"deploy-test",
['python', '-m', 'unittest', 'discover', '-v'],
cwd="""$${buildout:directory}/test""",
summaryf=UnitTest.summary,
)
[runTestSuite]
env.sh = $${deploy-test-nxdtest-environment.sh:rendered}
workdir = $${deploy-test-dot-nxdtest:workdir}
[switch_softwaretype]
default = $${:deploy-test}
...
...
@@ -53,3 +68,18 @@ context =
raw waittime ${deploy-script-controller-script:waittime}
raw tries ${deploy-script-controller-script:tries}
mode = 0644
[slapos-local-development-environment.sh]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/etc/${:_buildout_section_name_}
template = inline:
source $${deploy-test-nxdtest-environment.sh:rendered}
echo "Environment loaded."
echo "To work on a test, execute:"
echo " $${runTestSuite:wrapper-path} -k test_name"
echo "replacing test_name by the name of the test."
echo
[publish]
recipe = slapos.cookbook:publish
environment-script = $${slapos-local-development-environment.sh:rendered}
software/erp5testnode/testsuite/deploy-test/software.cfg
View file @
a12cd57d
...
...
@@ -2,18 +2,12 @@
extends =
buildout.hash.cfg
https://lab.nexedi.com/nexedi/slapos/raw/1.0.232/software/kvm/software.cfg
../../../../stack/nxdtest.cfg
parts =
python-with-eggs
template-deploy-test
runTestSuite_py
playbook
[runTestSuite_py]
recipe = zc.recipe.egg
eggs =
erp5.util
interpreter = ${:_buildout_section_name_}
[python2.7-with-eggs]
# create interpreters named "python" and "python2.7" so that
# instance profile can use them in $PATH
...
...
@@ -69,4 +63,4 @@ location = ${:_profile_base_location_}/${:filename}
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
mode =
0644
mode =
640
\ No newline at end of file
Boxiang Sun
@Daetalus
mentioned in merge request
nexedi/slapos!1166 (merged)
·
May 11, 2022
mentioned in merge request
nexedi/slapos!1166 (merged)
mentioned in merge request nexedi/slapos!1166
Toggle commit list
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