From 3a9620e948738b37dcf3c9c1eacfd1f0f912f2f0 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Mon, 26 Jan 2015 16:20:08 -0800 Subject: [PATCH] fix the coveralls report Summary: Ever since the switch from `test.sh` to `test.py`, we've been generating the `.coverage` file inside `tests/`. Update `.travis.yml` to run `coveralls` in the right place. Also, handle the `--with-coverage` flag in a slightly more flexible way. Test Plan: Watch the build in my fork and make sure it looks like it's going to work. Reviewers: sean Reviewed By: sean Differential Revision: https://phabricator.buildinspace.com/D182 --- .travis.yml | 2 +- test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 879763e..e8cb9dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ install: script: - ./test.py --with-coverage -v after_success: - coveralls + cd tests && coveralls diff --git a/test.py b/test.py index 56278de..e85925e 100755 --- a/test.py +++ b/test.py @@ -35,8 +35,8 @@ def main(): env = os.environ.copy() env['PYTHONPATH'] = REPO_ROOT args = sys.argv[1:] - if len(args) > 0 and args[0] == '--with-coverage': - args.pop(0) + if len(args) > 0 and '--with-coverage' in args: + args.remove('--with-coverage') command_start = ['coverage', 'run'] else: command_start = [sys.executable]