[test suite] minor file existence check

This commit is contained in:
Michael Rash 2016-01-17 13:06:12 -08:00
parent 4fc9d05660
commit 0a037d3554

View File

@ -7,6 +7,7 @@
import re import re
import argparse import argparse
import os
def main(): def main():
@ -25,6 +26,14 @@ def main():
if args.new_lcov_dir: if args.new_lcov_dir:
new_lcov_file = args.new_lcov_dir + "/" + final_lcov_file new_lcov_file = args.new_lcov_dir + "/" + final_lcov_file
if not os.path.exists(old_lcov_file):
print "[*] old coverage file does not exist: %s" % old_lcov_file
return 1
if not os.path.exists(new_lcov_file):
print "[*] new coverage file does not exist: %s" % new_lcov_file
return 1
old_zero_coverage = extract_zero_coverage(old_lcov_file) old_zero_coverage = extract_zero_coverage(old_lcov_file)
new_zero_coverage = extract_zero_coverage(new_lcov_file) new_zero_coverage = extract_zero_coverage(new_lcov_file)