Files
firmware_vhdl_psi_multi_str…/scripts/ciFlow.py
2019-07-03 10:33:57 +02:00

26 lines
662 B
Python

##############################################################################
# Copyright (c) 2018 by Paul Scherrer Institute, Switzerland
# All rights reserved.
# Authors: Oliver Bruendler
##############################################################################
import os
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
os.chdir(THIS_DIR + "/../sim")
os.system("vsim -batch -do ci.do -logfile Transcript.transcript")
with open("Transcript.transcript") as f:
content = f.read()
#Expected Errors
if "###ERROR###" in content:
exit(-1)
#Unexpected Errors
if "SIMULATIONS COMPLETED SUCCESSFULLY" not in content:
exit(-2)
#Success
exit(0)