summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2007-04-14 00:02:26 +0000
committerHolger Freyther <zecke@selfish.org>2007-04-14 00:02:26 +0000
commit26be8cbbcda059b28c3ab5c9bed9a3d9dd149239 (patch)
treed5d9c573e33a0283188c256d18586a77825b2d93
parentc065b26eab5d2845c67d78484cc2942f2be5c451 (diff)
downloadoetest-26be8cbbcda059b28c3ab5c9bed9a3d9dd149239.tar.gz
lib/bitttest: Add chksum_checker to the module list, allow setup and finish methods in the testcase
Allow setup and finish methods in TestCase. They will be executed before AND after all test cases have been run!
-rw-r--r--lib/bittest/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bittest/__init__.py b/lib/bittest/__init__.py
index a2d3bac308..01b799a57d 100644
--- a/lib/bittest/__init__.py
+++ b/lib/bittest/__init__.py
@@ -42,7 +42,8 @@ __all_tests__ = ["patch_checker",
"source_checker",
"doc_checker",
"content_checker",
- "depends_checker" ]
+ "depends_checker",
+ "chksum_checker" ]
# known reporting classes
__all_reports__ = {
@@ -128,6 +129,8 @@ def run_tests(data,test_config,test_options, tests, options):
# Create the TestResult container and initialize the Report
for test in test_instances:
test_results[test] = TestResult(test_instances[test].test_name(), __all_reports__[options.report](test_config, test, options.output) )
+ if hasattr(test_instances[test],"setup"):
+ test_instances[test].setup(test_config)
for bbfile in bbfiles:
@@ -175,4 +178,7 @@ def run_tests(data,test_config,test_options, tests, options):
# print "Running test for %s with machine: %s and distro: %s" % (bb.data.getVar('PN', test_run, True), machine, distro)
test_results[test].insert_result(test_instances[test].test(bbfile, test_run))
+ for test in test_instances:
+ if hasattr(test_instances[test],"finish"):
+ test_instances[test].finish(test_config)
return test_results