Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/12056 )
Change subject: systemc: Make verify.py delete obsolete diff files.
......................................................................
systemc: Make verify.py delete obsolete diff files.
If diff file exists but the underlying diff has been fixed, delete the
diff file.
Change-Id: Icadc21a61c084198a8a246ab6d00a9b885647cde
Reviewed-on: https://gem5-review.googlesource.com/12056
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/tests/verify.py
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py
index 822065c..ad61319 100755
--- a/src/systemc/tests/verify.py
+++ b/src/systemc/tests/verify.py
@@ -212,9 +212,9 @@
with open(self.test) as test_f, open(self.ref) as ref_f:
test = re.sub(self.test_filt, '', test_f.read())
ref = re.sub(self.ref_filt, '', ref_f.read())
+ diff_file = '.'.join([ref_file, 'diff'])
+ diff_path = os.path.join(self.out_dir, diff_file)
if test != ref:
- diff_file = '.'.join([ref_file, 'diff'])
- diff_path = os.path.join(self.out_dir, diff_file)
with open(diff_path, 'w') as diff_f:
for line in difflib.unified_diff(
ref.splitlines(True), test.splitlines(True),
@@ -222,6 +222,9 @@
tofile=test_file):
diff_f.write(line)
return False
+ else:
+ if os.path.exists(diff_path):
+ os.unlink(diff_path)
return True
class VerifyPhase(TestPhaseBase):
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12056
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Icadc21a61c084198a8a246ab6d00a9b885647cde
Gerrit-Change-Number: 12056
Gerrit-PatchSet: 9
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev