Changeset b053083


Ignore:
Timestamp:
Mar 11, 2022, 10:54:10 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
4f6dda0
Parents:
cc9b520
Message:

Fixed error handling for core_info

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/tools.py

    rcc9b520 rb053083  
    486486
    487487        try:
    488                 return sh('gdb', '-n', path, core, '-batch', '-x', cmd, output_file=subprocess.PIPE)
     488                ret, out, err = sh('gdb', '-n', path, core, '-batch', '-x', cmd, output_file=subprocess.PIPE)
     489                if ret == 0:
     490                        return 0, out
     491                else:
     492                        return 1, err
    489493        except:
    490494                return 1, "ERR Could not read core with gdb"
  • tests/test.py

    rcc9b520 rb053083  
    235235                                error = "Output log can't be read, file is bigger than 1MB, see {} for actual error\n".format(out_file)
    236236
    237                         ret, info, gdberr = core_info(exe_file)
    238                         if ret == 0:
    239                                 error = error + info if error else info
    240                         else :
    241                                 error = error + gdberr if error else gdberr
     237                        ret, info = core_info(exe_file)
     238                        error = error + info if error else info
    242239
    243240                        if settings.archive:
Note: See TracChangeset for help on using the changeset viewer.