diff options
author | Andy Hayden <andyhayden1@gmail.com> | 2019-06-08 04:46:57 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-08 07:46:57 -0400 |
commit | 5960e398ecab914effec821cc6da5f3a091fdb50 (patch) | |
tree | bb12c155ef59b725dcc0d7a32b757e47718cdaa1 /tools/test_format.py | |
parent | 4ea2df6759abf3a99e07fe720987805075c8a18b (diff) |
make tests quieter (#2468)
Don't mix every http request in with the tests output.
Don't print that the file servers are starting unless
-vv flag is passed.
Capture the output of run with run_output which returns
stdout, stderr and exit_code. Test against this rather
than relying on sys.exit.
Diffstat (limited to 'tools/test_format.py')
-rwxr-xr-x | tools/test_format.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/test_format.py b/tools/test_format.py index a0d5ba08e..00374d130 100755 --- a/tools/test_format.py +++ b/tools/test_format.py @@ -9,11 +9,12 @@ import subprocess def main(): util.run([sys.executable, "tools/format.py"]) - output = util.run_output( - ["git", "status", "-uno", "--porcelain", "--ignore-submodules"]) - if len(output) > 0: + result = util.run_output( + ["git", "status", "-uno", "--porcelain", "--ignore-submodules"], + exit_on_fail=True) + if result.out: print "Run tools/format.py " - print output + print result.out sys.exit(1) |