Anonymous avatar Anonymous committed 8103a58

Add two scripts for coverage tests

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.