summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2007-04-14 00:03:11 +0000
committerHolger Freyther <zecke@selfish.org>2007-04-14 00:03:11 +0000
commit17a4b29ac8bc47ae75bafa0889709a15f1a05393 (patch)
treea4d367ee8e1f7634f58dd4d1044f7c293e626426
parent26be8cbbcda059b28c3ab5c9bed9a3d9dd149239 (diff)
downloadoetest-17a4b29ac8bc47ae75bafa0889709a15f1a05393.tar.gz
oetest-17a4b29ac8bc47ae75bafa0889709a15f1a05393.tar.bz2
oetest-17a4b29ac8bc47ae75bafa0889709a15f1a05393.zip
modules/chksump_checker: Add a oetest that will write checksum files for us
-rw-r--r--modules/chksum_checker/.mtn2git_empty0
-rw-r--r--modules/chksum_checker/__init__.py41
-rw-r--r--modules/chksum_checker/chksum.py67
3 files changed, 108 insertions, 0 deletions
diff --git a/modules/chksum_checker/.mtn2git_empty b/modules/chksum_checker/.mtn2git_empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/modules/chksum_checker/.mtn2git_empty
diff --git a/modules/chksum_checker/__init__.py b/modules/chksum_checker/__init__.py
new file mode 100644
index 0000000..05b3358
--- /dev/null
+++ b/modules/chksum_checker/__init__.py
@@ -0,0 +1,41 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+#
+# Copyright (C) 2007 Holger Hans Peter Freyther
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# Neither the name Holger Hans Peter Freyther nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+import chksum
+
+__all__ = [
+ "create_test"
+]
+def create_test():
+ return chksum.TestCase()
diff --git a/modules/chksum_checker/chksum.py b/modules/chksum_checker/chksum.py
new file mode 100644
index 0000000..236a14a
--- /dev/null
+++ b/modules/chksum_checker/chksum.py
@@ -0,0 +1,67 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+#
+# Copyright (C) 2007 Holger Hans Peter Freyther
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# Neither the name Holger Hans Peter Freyther nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+from bittest import TestItem
+
+class TestCase:
+ """
+ A simple test case
+ """
+
+ def __init__(self):
+ """
+ Construct and initialize the test case
+ """
+
+ def setup(self, config):
+ print "Create"
+ pass
+
+ def finish(self, config):
+ print "Finish"
+ pass
+
+ def test(self,file_name, file_data):
+ """
+ Now run the test for file_name and the corresponding data.
+ You can use whatever you want
+ """
+
+ return TestItem(file_name,False,"The Test Failed")
+
+ def test_name(self):
+ """
+ Retutnr a name for the test
+ """
+ return "Create a checksum file"