test.cfg 1.34 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
[buildout]

extends =
    software.cfg
    ../../component/git/buildout.cfg
    ../../component/pytest/buildout.cfg

[beremiz-repository]
recipe  = slapos.recipe.build:gitclone
repository = https://github.com/beremiz/beremiz
branch  = wxPython4
location = ${buildout:parts-directory}/beremiz
git-executable = ${git:location}/bin/git

[beremiz-setup]
setup = ${beremiz-repository:location}
depends =
  ${beremiz-gen-nxdtest:recipe}

[ddt]
recipe  = zc.recipe.egg:custom
egg     =  ddt
setup-eggs =
  enum34

[python-interpreter]
eggs +=
  ${pytest:eggs}
  pytest-timeout
  ${ddt:egg}

[instance]
type = beremiz-test

[gen-nxdtest.sh]
recipe = slapos.recipe.template
output = ${buildout:parts-directory}/gennxdtest.sh
nxdtest = ${buildout:directory}/.nxdtest
inline =
  #!/bin/sh -e
  cd ${beremiz-repository:location}/tests/ide_tests/
  testlist=$(ls -d *.sikuli)
  rm -f ${:nxdtest}
  for test in $testlist; do
    if [ -z "$test" ]; then
      continue;
    fi
    # beremiztest script is generated by the instance (call make test_dir=xxx xserver_command=xxx)
    cat <<EOF >> ${:nxdtest}
  TestCase(
      "$test",
      ['beremiztest', '$test'],
      cwd="""${beremiz-repository:location}/tests""",
      summaryf=UnitTest.summary,
  )
  EOF
  done

[beremiz-gen-nxdtest]
recipe = plone.recipe.command
command = ${gen-nxdtest.sh:output}
update-command = ${:command}