mirror of
https://github.com/VLSIDA/OpenRAM.git
synced 2026-08-29 17:39:02 +02:00
Merged and fixed conflicts with dev
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
# See LICENSE for licensing information.
|
||||
#
|
||||
#Copyright (c) 2016-2019 Regents of the University of California and The Board
|
||||
#of Regents for the Oklahoma Agricultural and Mechanical College
|
||||
#(acting for and on behalf of Oklahoma State University)
|
||||
#All rights reserved.
|
||||
# Copyright (c) 2016-2019 Regents of the University of California and The Board
|
||||
# of Regents for the Oklahoma Agricultural and Mechanical College
|
||||
# (acting for and on behalf of Oklahoma State University)
|
||||
# All rights reserved.
|
||||
#
|
||||
import unittest,warnings
|
||||
import pdb,traceback
|
||||
import sys,os,glob,copy
|
||||
import shutil
|
||||
sys.path.append(os.path.join(sys.path[0],".."))
|
||||
sys.path.append(os.getenv("OPENRAM_HOME"))
|
||||
from globals import OPTS
|
||||
import debug
|
||||
|
||||
@@ -277,6 +278,7 @@ class openram_test(unittest.TestCase):
|
||||
debug.info(2,"MATCH {0} {1}".format(filename1,filename2))
|
||||
return True
|
||||
|
||||
|
||||
def header(filename, technology):
|
||||
# Skip the header for gitlab regression
|
||||
import getpass
|
||||
@@ -293,3 +295,19 @@ def header(filename, technology):
|
||||
from globals import OPTS
|
||||
print("|=========" + OPTS.openram_temp.center(60) + "=========|")
|
||||
print("|==============================================================================|")
|
||||
|
||||
def debugTestRunner(post_mortem=None):
|
||||
"""unittest runner doing post mortem debugging on failing tests"""
|
||||
if post_mortem is None:
|
||||
post_mortem = pdb.post_mortem
|
||||
class DebugTestResult(unittest.TextTestResult):
|
||||
def addError(self, test, err):
|
||||
# called before tearDown()
|
||||
traceback.print_exception(*err)
|
||||
post_mortem(err[2])
|
||||
super(DebugTestResult, self).addError(test, err)
|
||||
def addFailure(self, test, err):
|
||||
traceback.print_exception(*err)
|
||||
post_mortem(err[2])
|
||||
super(DebugTestResult, self).addFailure(test, err)
|
||||
return unittest.TextTestRunner(resultclass=DebugTestResult)
|
||||
|
||||
Reference in New Issue
Block a user