Commit e29d67e8 authored by zhifan huang's avatar zhifan huang

test

parent fc0cfd30
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[template] [template]
filename = instance.cfg filename = instance.cfg
md5sum = ba6c572678687081ce111d3805be3cee md5sum = df528e38ae84578f7001e29e41f89222
...@@ -101,94 +101,94 @@ rendered = $${:workdir}/.nxdtest ...@@ -101,94 +101,94 @@ rendered = $${:workdir}/.nxdtest
workdir = $${create-directory:nxdtest-working-dir} workdir = $${create-directory:nxdtest-working-dir}
template = inline: template = inline:
TestCase( # TestCase(
"kedifa", # "kedifa",
['python', '-m', 'unittest', 'discover', '-v'], # ['python', '-m', 'unittest', 'discover', '-v'],
cwd="""$${kedifa:location}""", # cwd="""$${kedifa:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"caucase", # "caucase",
['$${caucase-test-runner:rendered}'], # ['$${caucase-test-runner:rendered}'],
cwd="""$${caucase:location}""", # cwd="""$${caucase:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"erp5.util", # "erp5.util",
['python', '-m', 'unittest', 'discover', '-v', '--start', 'erp5/tests/'], # ['python', '-m', 'unittest', 'discover', '-v', '--start', 'erp5/tests/'],
cwd="""$${erp5.util:location}""", # cwd="""$${erp5.util:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.cookbook", # "slapos.cookbook",
# slapos/test contain both tests for recipes and tests for # # slapos/test contain both tests for recipes and tests for
# json schemas, we only care about recipe tests here, json # # json schemas, we only care about recipe tests here, json
# schemas are tested in software/slapos-sr-testing # # schemas are tested in software/slapos-sr-testing
['python', '-m', 'unittest', 'discover', '-v', '--start', 'slapos/test/recipe'], # ['python', '-m', 'unittest', 'discover', '-v', '--start', 'slapos/test/recipe'],
cwd="""$${slapos.cookbook:location}""", # cwd="""$${slapos.cookbook:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.core", # "slapos.core",
# ['python', '-m', 'unittest', 'discover', '-v'], # # ['python', '-m', 'unittest', 'discover', '-v'],
# XXX some test fail when running with unittest (slapos*.cfg.example # # XXX some test fail when running with unittest (slapos*.cfg.example
# files cannot be found with pkg_resources.resource_string), so we keep # # files cannot be found with pkg_resources.resource_string), so we keep
# using setup.py test for now. # # using setup.py test for now.
['python', 'setup.py', 'test'], # ['python', 'setup.py', 'test'],
cwd="""$${slapos.core:location}""", # cwd="""$${slapos.core:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.recipe.build", # "slapos.recipe.build",
['python', '-m', 'unittest', 'discover', '-v'], # ['python', '-m', 'unittest', 'discover', '-v'],
cwd="""$${slapos.recipe.build:location}""", # cwd="""$${slapos.recipe.build:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.recipe.cmmi", # "slapos.recipe.cmmi",
['python', '-m', 'unittest', 'discover', '-v'], # ['python', '-m', 'unittest', 'discover', '-v'],
cwd="""$${slapos.recipe.cmmi:location}""", # cwd="""$${slapos.recipe.cmmi:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.recipe.template", # "slapos.recipe.template",
# ['python', '-m', 'unittest', 'slapos.recipe.template.tests.test_suite'], # # ['python', '-m', 'unittest', 'slapos.recipe.template.tests.test_suite'],
# XXX some test fail when running with unittest, so we keep using setup.py test # # XXX some test fail when running with unittest, so we keep using setup.py test
['python', 'setup.py', 'test'], # ['python', 'setup.py', 'test'],
cwd="""$${slapos.recipe.template:location}""", # cwd="""$${slapos.recipe.template:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.toolbox", # "slapos.toolbox",
# ['python', '-m', 'unittest', 'discover', '-v'], # # ['python', '-m', 'unittest', 'discover', '-v'],
# XXX We can not just run unittest discover here, since slapos/lamp # # XXX We can not just run unittest discover here, since slapos/lamp
# imports MySQLDb and we currently don't have installed # # imports MySQLDb and we currently don't have installed
# slapos.toolbox[lampconfigure] and on python3 discovery make a # # slapos.toolbox[lampconfigure] and on python3 discovery make a
# failing test for this import error. # # failing test for this import error.
# Currently slapos/lamp is not tested, but if it it is still used, # # Currently slapos/lamp is not tested, but if it it is still used,
# the TODO seem to also install slapos.toolbox[lampconfigure] here. # # the TODO seem to also install slapos.toolbox[lampconfigure] here.
['python', '-m', 'unittest', 'discover', '-v', '--start', 'slapos/test', '--top-level-directory', '.'], # ['python', '-m', 'unittest', 'discover', '-v', '--start', 'slapos/test', '--top-level-directory', '.'],
cwd="""$${slapos.toolbox:location}""", # cwd="""$${slapos.toolbox:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.libnetworkcache", # "slapos.libnetworkcache",
['python', '-m', 'unittest', '-v', 'slapos.libnetworkcachetests'], # ['python', '-m', 'unittest', '-v', 'slapos.libnetworkcachetests'],
cwd="""$${slapos.libnetworkcache:location}""", # cwd="""$${slapos.libnetworkcache:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"slapos.rebootstrap", # "slapos.rebootstrap",
['python', '-m', 'unittest', '-v', 'slapos.rebootstrap.tests.test_suite'], # ['python', '-m', 'unittest', '-v', 'slapos.rebootstrap.tests.test_suite'],
cwd="""$${slapos.rebootstrap:location}""", # cwd="""$${slapos.rebootstrap:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
TestCase( # TestCase(
"rubygemsrecipe", # "rubygemsrecipe",
['python', '-m', 'unittest', 'discover', '-v'], # ['python', '-m', 'unittest', 'discover', '-v'],
cwd="""$${rubygemsrecipe:location}""", # cwd="""$${rubygemsrecipe:location}""",
summaryf=UnitTest.summary, # summaryf=UnitTest.summary,
) # )
[runTestSuite] [runTestSuite]
env.sh = $${slapos-test-runner-nxdtest-environment.sh:rendered} env.sh = $${slapos-test-runner-nxdtest-environment.sh:rendered}
......
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