diff options
author | Tyler Baker <tyler.baker@linaro.org> | 2014-03-21 12:08:30 -0700 |
---|---|---|
committer | Tyler Baker <tyler.baker@linaro.org> | 2014-03-21 12:08:30 -0700 |
commit | 695295a6d14129c3fda02df7edcc31636eef0d71 (patch) | |
tree | f6a496343b44928a60f8ee5d18e12a1184fc7170 /lava-project-ci.py | |
parent | ef65cba5f31d7b8f10d0e081043f1cd4a67eb6b2 (diff) |
better formatting
Diffstat (limited to 'lava-project-ci.py')
-rw-r--r-- | lava-project-ci.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lava-project-ci.py b/lava-project-ci.py index 27cabcd..ce669fb 100644 --- a/lava-project-ci.py +++ b/lava-project-ci.py @@ -35,7 +35,7 @@ def add_gerrit_comment(message, review): try: output = subprocess.check_output(cmd, shell=True) except subprocess.CalledProcessError as e: - message = '* SETUP STEP FAILED: %s' % cmd + message = '* SETUP STEP: [FAILED]: %s' % cmd result_message_list.append(message) print e.output publish_result() @@ -73,10 +73,10 @@ def checkout_and_rebase(): output = subprocess.check_output(cmd, shell=True) if debug: print output - message = '* SETUP STEP PASSED: %s' % cmd + message = '* SETUP STEP: [PASSED]: %s' % cmd result_message_list.append(message) except subprocess.CalledProcessError as e: - message = '* SETUP STEP FAILED: %s' % cmd + message = '* SETUP STEP: [FAILED]: %s' % cmd result_message_list.append(message) publish_result() exit(1) @@ -87,10 +87,10 @@ def checkout_and_rebase(): print cmd try: output = subprocess.check_output(cmd, shell=True) - message = '* SETUP STEP PASSED: %s' % cmd + message = '* SETUP STEP: [PASSED]: %s' % cmd result_message_list.append(message) except subprocess.CalledProcessError as e: - message = '* SETUP STEP FAILED: %s' % cmd + message = '* SETUP STEP: [FAILED]: %s' % cmd result_message_list.append(message) print e.output publish_result() @@ -104,12 +104,12 @@ def pep8_check(ignore_options): output = subprocess.check_output(cmd, shell=True) if debug: print output - message = '* TEST CASE PASSED: %s' % cmd + message = '* PEP8 CHECK: [PASSED]: %s' % cmd result_message_list.append(message) except subprocess.CalledProcessError as e: message_list = [] - message_list.append('* TEST CASE FAILED: %s' % cmd) - message_list.append('* TEST CASE OUTPUT:') + message_list.append('* PEP8 CHECK: [FAILED]: %s' % cmd) + message_list.append('* PEP8 CHECK: [OUTPUT]:') for line in e.output.splitlines(): message_list.append('* ' + line) message = '\n'.join(message_list) @@ -135,11 +135,11 @@ def run_unit_tests(): output = subprocess.check_output(cmd, shell=True) if debug: print output - message = '* TEST CASE PASSED: %s' % cmd + message = '* UNIT TESTS: [PASSED]: %s' % cmd result_message_list.append(message) except subprocess.CalledProcessError as e: message_list = [] - message_list.append('* TEST CASE FAILED: %s' % cmd) + message_list.append('* UNIT TEST: [FAILED]: %s' % cmd) message = '\n'.join(message_list) result_message_list.append(message) print e.output @@ -147,9 +147,10 @@ def run_unit_tests(): exit(1) def init(): - result_message_list.append('* LAVABOT RESULTS: for patch set: %s' % os.environ['GERRIT_PATCHSET_REVISION']) + result_message_list.append('* LAVABOT: [RESULTS]: for patch set: %s' % os.environ['GERRIT_PATCHSET_REVISION']) def main(ignore_options): + # Uncomment the following to run locally #debug = True #dummy_env() if check_enviroment(): |