Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Bug 1129843 - Convert update tests to Marionette #122

Merged
merged 1 commit into from Mar 24, 2015
Merged

Bug 1129843 - Convert update tests to Marionette #122

merged 1 commit into from Mar 24, 2015

Conversation

whimboo
Copy link
Contributor

@whimboo whimboo commented Mar 9, 2015

Currently a WIP which will get frequent updates over the next days. Nothing to review yet.

@whimboo whimboo self-assigned this Mar 9, 2015
@@ -2,4 +2,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from runtests import cli
from mixins import *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of wildcard imports (or mixins), but I'll keep reading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mixins no longer exist. I was using them at the beginning because it was easier to get it working by mostly copying from the gaia tests. But with different entry points it was a nightmare. I will finally update the folder when all is ready.

@whimboo whimboo changed the title Update tests Bug 1129843 - Convert update tests to Marionette Mar 14, 2015

:param flags: Specific restart flags for Firefox
"""
self.marionette.restart()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need the in application initiated restart? Wasn't this a hard and urgent requirement for implementing these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove it at some point because it was not working. I wanted to investigate it but looks like I forgot about it. I tried to re-add in_app=True but the tests are still failing because Firefox doesn't restart! I will get this investigated and a bug filed. Thanks for noticing that!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the locally installed packages for driver and client were totally messed-up. When installing the client from m-c it downloads the driver from pypi but not picking it up from m-c too. I fixed that and it works now.


finally:
self.updates[self.current_update_index]['patch'] = about_window.patch_info

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method from here up is shared with the other class.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can combine that for sure. Just wanted to see what could be necessary for multiple update steps. But once we work on those we can split the shared code where necessary.

# Dictionary which holds the information for each update
self.updates = [{
'build_pre': self.software_update.build_info,
'build_post': self.software_update.build_info,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not add this key until after the update is performed. I had to look at this pretty closely to conclude it does the right thing based on build_post getting updated after the update. The assertions are mostly using assertEqual, so if we had mistakenly been aliasing build_pre in build_post they would almost all pass despite the error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to do this to workaround the fact that a possible crash or whatever else doesn't let us finish the test. If we move this assignment to the end of the test, we won't have a post build assigned. This would add a lot more extra cases to the dashboard (treeherder view).

Even that we are safer now for Python tests, I would propose that we keep this for now and if necessary find an alternative solution as a follow-up bug. The code as is has been proven to work over the last years.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then can you have its value be None here? I'm skeptical of making decisions here based on a dashboard we haven't made yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will do it. So we will tweak it when I returned.

@whimboo whimboo merged commit a8bd457 into mozilla:master Mar 24, 2015
@whimboo whimboo deleted the update_tests branch March 24, 2015 23:03
@whimboo whimboo removed their assignment Aug 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants