Skip to content

Commit

Permalink
Separate ngspice version and result file check
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyagoyal authored Nov 30, 2023
1 parent ac0f657 commit b869fe2
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions .github/scripts/parse_rpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,17 @@

if len(sys.argv) == 1:
sim_state_filename = "work/sim_state_file.txt"

if check_ngspice_version():
result_filename = "work/prePEX_sim_result"

template_filename = "../../../.github/scripts/expected_sim_outputs/prePEX_sim_result.txt"
with open(result_filename) as f2, open(template_filename) as f1:
content1 = f2.readlines()
content2 = f1.readlines()
if content1 != content2:
warnings.warn("Simulation result file does not match! Please contact a maintainer of the repo!", DeprecationWarning)
else:
print("The ngspice version does not match, "
result_filename = "work/prePEX_sim_result"

template_filename = "../../../.github/scripts/expected_sim_outputs/prePEX_sim_result"
with open(result_filename) as f2, open(template_filename) as f1:
content1 = f2.readlines()
content2 = f1.readlines()
if content1 != content2:
warnings.warn("Simulation result file does not match! Please contact a maintainer of the repo!", DeprecationWarning)

if check_ngspice_version() == 0:
warnings.warn("The ngspice version does not match, "
"frequency results might not match! "
"Please contact a maintainer of the repo.", DeprecationWarning)

Expand All @@ -149,4 +148,4 @@
else:
raise ValueError("Simulations failed: required of run folders do not exist!")

print("Simulations are clean!")
print("Simulations are clean!")

0 comments on commit b869fe2

Please sign in to comment.