def dump_error(bindir, ismem=False): abd = abspath(bindir) if ismem: pth = abspath('{0}/klee-last/test000001.ptr.err'.format(abd)) if not isfile(pth): pth = abspath('{0}/klee-last/test000001.leak.err'.format(abd)) else: pth = abspath('{0}/klee-last/test000001.assert.err'.format(abd)) if not isfile(pth): from symbiotic.utils import dbg dbg("Couldn't find the file with error description") return try: f = open(pth, 'r') print('\n --- Error trace ---\n') for line in f: print_stdout(line, print_nl=False) print('\n --- ----------- ---') except OSError: from symbiotic.utils import dbg # this dumping is just for convenience, # so do not return any error dbg('Failed dumping the error')
def dump_error(pth): if not isfile(pth): from symbiotic.utils import dbg dbg("Couldn't find the file with error description") return try: f = open(pth, 'r') print('\n --- Error trace ---\n') for line in f: print_stdout(line, print_nl=False) print('\n --- ----------- ---') except OSError: from symbiotic.utils import dbg # this dumping is just for convenience, # so do not return any error dbg('Failed dumping the error')
def dump_error(pth): if not isfile(pth): dbg("Couldn't find the file with error description") return try: f = open(pth, 'r') print('\n --- Error trace ---\n') for line in f: print_stdout(line, print_nl = False) print('\n --- Sequence of non-deterministic values [function:file:line:col] ---\n') _dumpObjects(pth[:pth.find('.')+1]+'ktest') print('\n --- ----------- ---') except OSError as e: # this dumping is just for convenience, # so do not return any error dbg('Failed dumping the error: {0}'.format(str(e)))