Merge pull request #881 from larsclausen/empty-gold
vvp_reg.py: Allow to omit empty gold files
This commit is contained in:
commit
0144168723
|
|
@ -90,8 +90,13 @@ def compare_files(log_path, gold_path):
|
||||||
|
|
||||||
with open(log_path, 'rt') as fd:
|
with open(log_path, 'rt') as fd:
|
||||||
a = fd.readlines()
|
a = fd.readlines()
|
||||||
with open(gold_path, 'rt') as fd:
|
|
||||||
b = fd.readlines()
|
# Allow to omit empty gold files
|
||||||
|
if os.path.exists(gold_path):
|
||||||
|
with open(gold_path, 'rt') as fd:
|
||||||
|
b = fd.readlines()
|
||||||
|
else:
|
||||||
|
b = []
|
||||||
|
|
||||||
flag = a == b
|
flag = a == b
|
||||||
if not flag:
|
if not flag:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue