Merge lp:~joetalbott/utah/fix_fetch_revision into lp:utah

Proposed by Joe Talbott
Status: Merged
Approved by: Javier Collado
Approved revision: 816
Merged at revision: 816
Proposed branch: lp:~joetalbott/utah/fix_fetch_revision
Merge into: lp:utah
Diff against target: 15 lines (+5/-0)
1 file modified
utah/client/runner.py (+5/-0)
To merge this branch: bzr merge lp:~joetalbott/utah/fix_fetch_revision
Reviewer Review Type Date Requested Status
Javier Collado (community) Approve
Joe Talbott (community) Needs Resubmitting
Review via email: mp+148212@code.launchpad.net

Commit message

Don't allow a failed remote 'bzr revno' to halt testsuite execution.

Description of the change

Don't allow a failed remote 'bzr revno' to halt testsuite execution.

To post a comment you must log in.
Revision history for this message
Javier Collado (javier.collado) wrote :

I tried to run the code in this branch and was able to reproduce the problem it
adresses (it seems that launchpad issues are not uncommon).

The report I obtained, was like this:
...
- cmd_type: testsuite_fetch
  command: bzr revno lp:utah/utah/client/examples/utah_tests_sample
  returncode: 3
  start_time: '2013-02-13 17:49:10'
  stderr: |-
    You have not informed bzr of your Launchpad ID, and you must do this to
    write to Launchpad or access private data. See "bzr help launchpad-login".
    bzr: ERROR: Invalid http response for http://bazaar.launchpad.net/~utah/utah/dev/utah/client/.bzr/branch-format: Unable to handle http code 502: Bad Gateway
  stdout: ''
  time_delta: '0:00:02.631339'
  user: root
...
errors: 0
failures: 0
fetch_errors: 1
...
passes: 1
...

However, the return code was '255' instead of '0' which I believe should have
been the correct value given that all test cases passed.

review: Needs Fixing
816. By Joe Talbott

Don't increment fetch_errors if revision command fails.

Revision history for this message
Joe Talbott (joetalbott) wrote :

Updated to not increment fetch_errors.

review: Needs Resubmitting
Revision history for this message
Javier Collado (javier.collado) wrote :

This time I was just able to simulate the problem changing the commands in
common.py, but that was enough to make sure that the return code was '0' and
the number of passes was correct.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utah/client/runner.py'
2--- utah/client/runner.py 2013-02-11 17:18:56 +0000
3+++ utah/client/runner.py 2013-02-13 19:39:22 +0000
4@@ -475,6 +475,11 @@
5 res = vcs_handler.revision(directory=rev_dir)
6 self.result.add_result(res)
7
8+ # If we're unable to get the revision number indicate a
9+ # fetch failure but allow the test runs to proceed.
10+ if self.result.status != 'PASS':
11+ self.result.status = 'PASS'
12+
13 self.fetched_suites.append(name)
14
15 # Create a TestSuite

Subscribers

People subscribed via source and target branches