Commits

Anonymous committed 8103a58

Add two scripts for coverage tests

  • Participants
  • Parent commits 01a48b8

Comments (0)

Files changed (2)

+"""
+Run the maximum of tests to have good coverage test.
+"""
+
+import os
+import imp
+
+def main():
+    home = os.getenv("HOME")
+    assert home
+    os.path.join(home, "testcase")
+
+    parser = imp.load_source("parser", "hachoir-parser/tests/run_testcase.py")
+    parser.testRandom()
+    parser.testFiles(directory)
+
+    metadata = imp.load_source("metadata", "hachoir-metadata/run_testcase.py")
+    metadata.testFiles(directory)
+
+#    core_doc = imp.load_source("parser", "hachoir-core/test_doc.py")
+#    print "CORE=================================="
+#    core_doc.testDoc("doc/hachoir-api.rst")
+#    core_doc.testModule("hachoir_core.bits")
+#    core_doc.testModule("hachoir_core.compatibility")
+#    core_doc.testModule("hachoir_core.text_handler")
+#    core_doc.importModule("hachoir_core.tools")
+#    print "END CORE=================================="
+
+if __name__ == "__main__":
+    main()
+
+#!/bin/sh
+
+# Use Olivier Grisel "trace2html" tool to do coverage test
+# Create HTML report in coverage_report/ directory
+#
+# http://cheeseshop.python.org/pypi/trace2html
+
+trace2html.py -w hachoir_core -w hachoir_parser -w hachoir_metadata -o coverage_report --run-command coverage_test.py