Commit 13848142 authored by Łukasz Nowak's avatar Łukasz Nowak

Provide pythonized runTestSuite

Inspired by build-rina style.
parent 84c13c09
...@@ -7,7 +7,6 @@ offline = true ...@@ -7,7 +7,6 @@ offline = true
parts = parts =
request-kvm request-kvm
deploy-unit-test
[request-kvm] [request-kvm]
<= slap-connection <= slap-connection
...@@ -46,12 +45,3 @@ tmp = ${:home}/tmp/ ...@@ -46,12 +45,3 @@ tmp = ${:home}/tmp/
log = ${:var}/log/ log = ${:var}/log/
services = ${:etc}/service/ services = ${:etc}/service/
scripts = ${:etc}/run/ scripts = ${:etc}/run/
[deploy-unit-test]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
exit 0
output = ${directory:bin}/runTestSuite
mode = 755
[buildout] [buildout]
extends = ${template:output} extends = ${template:output}
parts +=
runTestSuite
[runTestSuite]
recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/bin/$${:_buildout_section_name_}
template = ${:_profile_base_location_}/$${:_buildout_section_name_}.in
mode = 0755
context =
raw runTestSuite_py ${buildout:bin-directory}/${runTestSuite_py:interpreter}
[switch-softwaretype] [switch-softwaretype]
default = $${:cdn-test} default = $${:cdn-test}
......
#!{{ runTestSuite_py }}
from __future__ import print_function
import argparse, os, subprocess, sys, traceback
from time import gmtime, strftime, time
from erp5.util import taskdistribution
from erp5.util.testsuite import format_command
...@@ -5,6 +5,13 @@ parts = ...@@ -5,6 +5,13 @@ parts =
eggs eggs
slapos-package slapos-package
template-cdn-test template-cdn-test
runTestSuite_py
[runTestSuite_py]
recipe = zc.recipe.egg
eggs =
erp5.util
interpreter = ${:_buildout_section_name_}
[slapos-package] [slapos-package]
recipe = slapos.recipe.build:gitclone recipe = slapos.recipe.build:gitclone
...@@ -31,7 +38,7 @@ tries = 10 ...@@ -31,7 +38,7 @@ tries = 10
[template-cdn-test] [template-cdn-test]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
md5sum = bafe9d0860658076c834edc00b7d8cb9 md5sum = 6a3b7b0af83e605628a5ea37c376019a
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
...@@ -39,7 +46,7 @@ mode = 0644 ...@@ -39,7 +46,7 @@ mode = 0644
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
ignore-existing = true ignore-existing = true
url = ${:_profile_base_location_}/instance-cdn-test.cfg.jinja2 url = ${:_profile_base_location_}/instance-cdn-test.cfg.jinja2
md5sum = 8711cdffa7c40b3e1c7d9b76217a0f8a md5sum = aa0254d43585c59f460a75a0feb5a7d0
mode = 0644 mode = 0644
download-only = true download-only = true
on-update = true on-update = true
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