Commit a2af2c8c authored by Xiaowu Zhang's avatar Xiaowu Zhang

Add re6stnet in slapos testing

See merge request nexedi/slapos!1266
parents 4c89be22 79855880
Pipeline #23860 failed with stage
in 0 seconds
[buildout]
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
parts =
brctl
[brctl]
recipe = slapos.recipe.cmmi
url = https://mirrors.edge.kernel.org/pub/linux/utils/net/bridge-utils/bridge-utils-1.7.1.tar.xz
md5sum = 3e1fee4dc22cac5457c2f6ffb990a518
environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:%(PATH)s
pre-configure =
aclocal &&
autoconf
[buildout]
extends =
../nftables/buildout.cfg
../util-linux/buildout.cfg
../pkgconfig/buildout.cfg
../openssl/buildout.cfg
../zlib/buildout.cfg
parts =
miniupnpd
[miniupnp-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/miniupnp/miniupnp.git
revision = miniupnpd_2_3_0
git-executable = ${git:location}/bin/git
[miniupnpd]
recipe = slapos.recipe.cmmi
shared = true
path = ${miniupnp-repository:location}/miniupnpd
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${iptables:location}/lib/pkgconfig:${libuuid:location}/lib/pkgconfig:${openssl:location}/lib/pkgconfig
LDFLAGS=-L${libuuid:location}/lib -L${openssl:location}/lib -L${zlib:location}/lib
# because these configure not support prefix syntax
configure-command = ./configure
configure-options =
--firewall=iptables
make-options =
-f Makefile.linux
make-targets =
install PREFIX=%(location)s
......@@ -15,4 +15,4 @@
[template]
filename = instance.cfg
md5sum = 3112bf86fa543df52548a551f5413f99
md5sum = a8bd56d112344ae56138e3a775fec478
......@@ -87,12 +87,26 @@ repository = ${slapos.rebootstrap-repository:location}
<= download-source
repository = ${rubygemsrecipe-repository:location}
[re6stnet]
<= download-source
repository = ${re6stnet-repository:location}
[re6stnet-test-runner]
recipe = slapos.recipe.template:jinja2
template = inline:#!/bin/sh
#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
python -m unittest discover -v
rendered = $${re6stnet:location}/test-runner.sh
[slapos-test-runner-nxdtest-environment.sh]
recipe = slapos.recipe.template
output = $${create-directory:etc}/$${:_buildout_section_name_}
inline =
export PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${jq:location}/bin:${sed:location}/bin:${grep:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${buildout:bin-directory}:$PATH
export PATH=${coreutils:location}/bin:${curl:location}/bin:${openssl:location}/bin:${jq:location}/bin:${sed:location}/bin:${grep:location}/bin:${git:location}/bin:${libxslt:location}/bin:${socat:location}/bin:${lmsensors:location}/bin:${rsync:location}/bin/:${iptables:location}/sbin:${miniupnpd:location}/usr/sbin:${brctl:location}/sbin:${openvpn:location}/sbin:${babeld:location}/bin:${buildout:bin-directory}:$PATH
export SLAPOS_TEST_IPV4=$${slap-configuration:ipv4-random}
export SLAPOS_TEST_IPV6=$${slap-configuration:ipv6-random}
export SLAPOS_TEST_EGGS_DIRECTORY=$${buildout:eggs-directory}
......@@ -105,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'],
......@@ -199,6 +214,14 @@ inline =
cwd="""$${rubygemsrecipe:location}""",
summaryf=UnitTest.summary,
)
if six.PY2:
TestCase(
"re6stnet",
['unshare', '-Umnr', '$${re6stnet-test-runner:rendered}'],
cwd="""$${re6stnet:location}/re6st/tests""",
summaryf=UnitTest.summary,
)
[runTestSuite]
env.sh = $${slapos-test-runner-nxdtest-environment.sh:output}
......
......@@ -4,3 +4,7 @@ extends =
[python]
part = python2.7
[extra-eggs]
eggs +=
${re6stnet-setup:egg}
......@@ -19,6 +19,11 @@ extends =
../../component/userhosts/buildout.cfg
../../component/postgresql/buildout.cfg
../../component/psycopg2/buildout.cfg
../../component/nftables/buildout.cfg
../../component/miniupnpd/buildout.cfg
../../component/openvpn/buildout.cfg
../../component/babeld/buildout.cfg
../../component/bridge-utils/buildout.cfg
../../stack/slapos.cfg
../../stack/caucase/buildout.cfg
../../stack/nxdtest.cfg
......@@ -116,6 +121,14 @@ setup = ${slapos.rebootstrap-repository:location}
egg = rubygemsrecipe[test]
setup = ${rubygemsrecipe-repository:location}
[re6stnet-setup]
<= setup-develop-egg
egg = re6stnet[test]
setup = ${re6stnet-repository:location}
[extra-eggs]
eggs =
[eggs]
<= python-interpreter
eggs +=
......@@ -142,6 +155,7 @@ eggs +=
${rubygemsrecipe-setup:egg}
zope.testing
supervisor
${extra-eggs:eggs}
[eggs/scripts]
recipe = zc.recipe.egg
......@@ -215,6 +229,10 @@ repository = https://lab.nexedi.com/nexedi/slapos.rebootstrap.git
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/rubygemsrecipe.git
[re6stnet-repository]
<= git-clone-repository
repository = https://lab.nexedi.com/nexedi/re6stnet.git
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
......@@ -253,3 +271,8 @@ zope.testing = 4.6.2
pathlib = 1.0.1
psycopg2 = 2.8.6
iniparse = 0.5
miniupnpc = 1.9
nemu = 0.3.1
multiping = 1.1.2
python-passfd = 0.2
python-unshare = 0.2
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