Commit 79855880 authored by Xiaowu Zhang's avatar Xiaowu Zhang

software/slaps-testing: re6stnet only support python2

parent b22d8580
......@@ -15,4 +15,4 @@
[template]
filename = instance.cfg
md5sum = 446cbfe05097bf03f6b4de742fa8ab28
md5sum = a8bd56d112344ae56138e3a775fec478
......@@ -94,8 +94,8 @@ repository = ${re6stnet-repository:location}
[re6stnet-test-runner]
recipe = slapos.recipe.template:jinja2
template = inline:#!/bin/sh
#change #!/usr/bin/python2 -> #!/real_python_path/bin/python2
sed '1s?/usr/bin/python2?${python2.7:location}/bin/python2?' -i ${re6stnet-repository:location}/re6st/ovpn-*
#change #!/usr/bin/python2 -> #!/real_python_path/bin/pythonVersion
sed '1s?/usr/bin/python2?${python:location}/bin/python${python:version}?' -i ${re6stnet-repository:location}/re6st/ovpn-*
# update files in /sys/class/net
mount -t sysfs sysfs /sys
......@@ -119,6 +119,7 @@ recipe = slapos.recipe.template
output = $${:workdir}/.nxdtest
workdir = $${create-directory:nxdtest-working-dir}
inline =
import six
TestCase(
"kedifa",
['python', '-m', 'unittest', 'discover', '-v'],
......@@ -213,12 +214,13 @@ inline =
cwd="""$${rubygemsrecipe:location}""",
summaryf=UnitTest.summary,
)
TestCase(
"re6stnet",
['unshare', '-Umnr', '$${re6stnet-test-runner:rendered}'],
cwd="""$${re6stnet:location}/re6st/tests""",
summaryf=UnitTest.summary,
)
if six.PY2:
TestCase(
"re6stnet",
['unshare', '-Umnr', '$${re6stnet-test-runner:rendered}'],
cwd="""$${re6stnet:location}/re6st/tests""",
summaryf=UnitTest.summary,
)
[runTestSuite]
......
......@@ -4,3 +4,7 @@ extends =
[python]
part = python2.7
[extra-eggs]
eggs +=
${re6stnet-setup:egg}
......@@ -126,6 +126,9 @@ setup = ${rubygemsrecipe-repository:location}
egg = re6stnet[test]
setup = ${re6stnet-repository:location}
[extra-eggs]
eggs =
[eggs]
<= python-interpreter
eggs +=
......@@ -150,12 +153,9 @@ eggs +=
${slapcache-setup:egg}
${slapos.rebootstrap-setup:egg}
${rubygemsrecipe-setup:egg}
${re6stnet-setup:egg}
zope.testing
supervisor
pathlib2
python-unshare
python-passfd
${extra-eggs:eggs}
[eggs/scripts]
recipe = zc.recipe.egg
......
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