Commit 79855880 authored by Xiaowu Zhang's avatar Xiaowu Zhang

software/slaps-testing: re6stnet only support python2

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