Merge pull request #1194 from sidheshenator/regression_test_output_tweaks

gold files are easily available in th OP folder in case of diff
This commit is contained in:
Richard Cordovano 2015-04-16 10:02:33 -04:00
commit 9493c3d18b
2 changed files with 12 additions and 0 deletions

View File

@ -848,6 +848,12 @@ class TestResultsDiffer(object):
dffcmdlst = ["diff", output_file, gold_file]
subprocess.call(dffcmdlst, stdout = diff_file)
Errors.add_errors_out(diff_path)
# create file path for gold files inside report output folder. In case of diff, both gold and current run
# Exception.txt files are available in the report output folder. Prefix Gold- is added to the filename.
gold_file_in_output_dir = output_file[:output_file.rfind("\\")] + "Gold-" + output_file[output_file.rfind("\\")+1:]
shutil.copy(gold_file, gold_file_in_output_dir)
return False
else:
return True

View File

@ -141,6 +141,12 @@ class TskDbDiff(object):
diff_file = codecs.open(diff_path, "wb", "utf_8")
dffcmdlst = ["diff", gold_file, output_file]
subprocess.call(dffcmdlst, stdout = diff_file)
# create file path for gold files inside output folder. In case of diff, both gold and current run files
# are available in the report output folder. Prefix Gold- is added to the filename.
gold_file_in_output_dir = output_file[:output_file.rfind("/")] + "/Gold-" + output_file[output_file.rfind("/")+1:]
shutil.copy(gold_file, gold_file_in_output_dir)
return False