diff --git a/Testing/script/regression.py b/Testing/script/regression.py index 7ea4c3acaf..f240010a1a 100644 --- a/Testing/script/regression.py +++ b/Testing/script/regression.py @@ -264,7 +264,9 @@ class Database: "AutopsyTestCase", "autopsy.db") autopsy_con = sqlite3.connect(autopsy_db_file) 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) 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_con = sqlite3.connect(gold_db_file) 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) self.gold_artifacts.append(gold_cur.fetchone()[0]) @@ -920,7 +924,7 @@ def generate_html(): html = open(case.html_log, "a") # The image title title = "

" + case.image_name + " \ - tested on " + socket.gethostname() + "

\ + tested on " + socket.gethostname() + "\

\ Errors and Warnings |\ Information |\