Changeset ea62265


Ignore:
Timestamp:
Mar 28, 2019, 11:50:41 AM (2 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
f806b61
Parents:
e8fe5e0
Message:

test now print better in dry-run mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/pybin/tools.py

    re8fe5e0 rea62265  
    2727        # if this is a dry_run, only print the commands that would be ran
    2828        if settings.dry_run :
    29                 print("cmd: %s" % ' '.join(cmd))
     29                cmd = "cmd: {}".format(' '.join(cmd))
     30                if output and output != subprocess.DEVNULL and output != subprocess.PIPE:
     31                        cmd += " > "
     32                        cmd += output
     33
     34                if error and error != subprocess.DEVNULL and error != subprocess.PIPE and error != subprocess.STDOUT:
     35                        cmd += " 2> "
     36                        cmd += error
     37
     38                if input and input != subprocess.DEVNULL and os.path.isfile(input):
     39                        cmd += " < "
     40                        cmd += input
     41
     42                print(cmd)
    3043                return 0, None
    3144
Note: See TracChangeset for help on using the changeset viewer.