Ignore:
Timestamp:
Mar 9, 2022, 7:59:46 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
b053083
Parents:
5baa33c
Message:

Clean-up error handling in test scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/settings.py

    r5baa33c rcc9b520  
    192192        global distcc
    193193        distcc       = "DISTCC_CFA_PATH=~/.cfadistcc/%s/cfa" % tools.config_hash()
    194         errf = os.path.join(BUILDDIR, ".validate.err")
    195         make_ret, out = tools.make( ".validate", error_file = errf, output_file=subprocess.DEVNULL, error=subprocess.DEVNULL )
     194        make_ret, out, err = tools.make( ".validate", output_file=subprocess.PIPE, error=subprocess.PIPE )
    196195        if make_ret != 0:
    197                 with open (errf, "r") as myfile:
    198                         error=myfile.read()
    199196                print("ERROR: Invalid configuration %s:%s" % (arch.string, debug.string), file=sys.stderr)
    200                 print("       verify returned : \n%s" % error, file=sys.stderr)
    201                 tools.rm(errf)
     197                print("       verify returned : \n%s" % err, file=sys.stderr)
    202198                sys.exit(1)
    203 
    204         tools.rm(errf)
    205199
    206200def prep_output(tests):
Note: See TracChangeset for help on using the changeset viewer.