Closed Bug 801652 Opened 12 years ago Closed 12 years ago

More difficult than it should be to diagnose problems when remote reftests/mochitests fail

Categories

(Testing :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla19

People

(Reporter: wlach, Assigned: wlach)

References

Details

Attachments

(1 file)

This is a bit of a followup to some stuff I found in bug 756440.

The chief problem is that we only print the logcat when the tests are successful... but it's often when we have *problems* running the test that the logcat is most interesting, as it might be able to give us clues as to what went wrong.
This mostly just does what it says. There's some cleanup in the surrounding code, as well as a fix for a syntax error in remote mochitest which meant that the cleanup code would never be called at all in the case of error (we were calling self.cleanup, but we were not part of the mochitest object!)
Attachment #671439 - Flags: review?(jmaher)
Comment on attachment 671439 [details] [diff] [review]
Print logcat even on mochitest/reftest failure

Review of attachment 671439 [details] [diff] [review]:
-----------------------------------------------------------------

just a few questions, otherwise this looks good.

::: layout/tools/reftest/remotereftest.py
@@ +13,4 @@
>  from runreftest import RefTest
>  from runreftest import ReftestOptions
>  from automation import Automation
> +import devicemanager, devicemanagerADB, devicemanagerSUT, devicemanager

this doesn't look right?  If this is intentional, please comment why we need to import devicemanager twice.

::: testing/mochitest/runtestsremote.py
@@ +479,5 @@
>                  print "TEST-UNEXPECTED-FAIL | %s | Exception caught while running robocop tests." % sys.exc_info()[1]
>                  mochitest.stopWebServer(options)
>                  mochitest.stopWebSocketServer(options)
>                  try:
> +                    mochitest.cleanup(None, options)

why mochitest.cleanup vs self.cleanup?

@@ +502,5 @@
> +            print "TEST-UNEXPECTED-FAIL | %s | Exception caught while running tests." % sys.exc_info()[1]
> +            mochitest.stopWebServer(options)
> +            mochitest.stopWebSocketServer(options)
> +            try:
> +                mochitest.cleanup(None, options)

why not self.cleanup?
Attachment #671439 - Flags: review?(jmaher) → review+
Thanks for the quick review.

(In reply to Joel Maher (:jmaher) from comment #2)
> Comment on attachment 671439 [details] [diff] [review]
> Print logcat even on mochitest/reftest failure
> 
> Review of attachment 671439 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> just a few questions, otherwise this looks good.
> 
> ::: layout/tools/reftest/remotereftest.py
> @@ +13,4 @@
> >  from runreftest import RefTest
> >  from runreftest import ReftestOptions
> >  from automation import Automation
> > +import devicemanager, devicemanagerADB, devicemanagerSUT, devicemanager
> 
> this doesn't look right?  If this is intentional, please comment why we need
> to import devicemanager twice.

Obviously just a mistake. :) Will fix before pushing.

> ::: testing/mochitest/runtestsremote.py
> @@ +479,5 @@
> >                  print "TEST-UNEXPECTED-FAIL | %s | Exception caught while running robocop tests." % sys.exc_info()[1]
> >                  mochitest.stopWebServer(options)
> >                  mochitest.stopWebSocketServer(options)
> >                  try:
> > +                    mochitest.cleanup(None, options)
> 
> why mochitest.cleanup vs self.cleanup?

As I mentioned, this code isn't part of the mochitest object, so we get an error thrown if we try to access it (this was hidden by the fact that the code in question was in a try...except block)
Blocks: 732325
Forgot to fix jmaher's nit, pushed as a followup:

https://hg.mozilla.org/integration/mozilla-inbound/rev/fdbf73f25fba
https://hg.mozilla.org/mozilla-central/rev/47302ab431e9
https://hg.mozilla.org/mozilla-central/rev/fdbf73f25fba
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: