Fixed number of artifact types the regression test looks for.

This commit is contained in:
devin148 2012-08-20 15:23:31 -04:00
parent eb407444a5
commit 7cfb09c176

View File

@ -264,7 +264,9 @@ class Database:
"AutopsyTestCase", "autopsy.db") "AutopsyTestCase", "autopsy.db")
autopsy_con = sqlite3.connect(autopsy_db_file) autopsy_con = sqlite3.connect(autopsy_db_file)
autopsy_cur = autopsy_con.cursor() autopsy_cur = autopsy_con.cursor()
for type_id in range(1, 13): autopsy_cur.execute("SELECT COUNT(*) FROM blackboard_artifact_types")
length = autopsy_cur.fetchone()[0] + 1
for type_id in range(1, length):
autopsy_cur.execute("SELECT COUNT(*) FROM blackboard_artifacts WHERE artifact_type_id=%d" % type_id) autopsy_cur.execute("SELECT COUNT(*) FROM blackboard_artifacts WHERE artifact_type_id=%d" % type_id)
self.autopsy_artifacts.append(autopsy_cur.fetchone()[0]) self.autopsy_artifacts.append(autopsy_cur.fetchone()[0])
@ -293,7 +295,9 @@ class Database:
gold_db_file = os.path.join("./", case.gold, case.image_name, "standard.db") gold_db_file = os.path.join("./", case.gold, case.image_name, "standard.db")
gold_con = sqlite3.connect(gold_db_file) gold_con = sqlite3.connect(gold_db_file)
gold_cur = gold_con.cursor() gold_cur = gold_con.cursor()
for type_id in range(1, 13): gold_cur.execute("SELECT COUNT(*) FROM blackboard_artifact_types")
length = gold_cur.fetchone()[0] + 1
for type_id in range(1, length):
gold_cur.execute("SELECT COUNT(*) FROM blackboard_artifacts WHERE artifact_type_id=%d" % type_id) gold_cur.execute("SELECT COUNT(*) FROM blackboard_artifacts WHERE artifact_type_id=%d" % type_id)
self.gold_artifacts.append(gold_cur.fetchone()[0]) self.gold_artifacts.append(gold_cur.fetchone()[0])
@ -920,7 +924,7 @@ def generate_html():
html = open(case.html_log, "a") html = open(case.html_log, "a")
# The image title # The image title
title = "<h1><a name='" + case.image_name + "'>" + case.image_name + " \ title = "<h1><a name='" + case.image_name + "'>" + case.image_name + " \
<span><i>tested on</i> " + socket.gethostname() + "</span></a></h1>\ <span>tested on " + socket.gethostname() + "</span></a></h1>\
<h2 align='center'>\ <h2 align='center'>\
<a href='#" + case.image_name + "-errors'>Errors and Warnings</a> |\ <a href='#" + case.image_name + "-errors'>Errors and Warnings</a> |\
<a href='#" + case.image_name + "-info'>Information</a> |\ <a href='#" + case.image_name + "-info'>Information</a> |\