update sut_tools to reference devicemanagerSUT instead of devicemanager

RESOLVED FIXED

Status

Release Engineering
General
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: jmaher, Assigned: bear)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [android][tegra][mobile_unittests])

Attachments

(2 attachments, 1 obsolete attachment)

Created attachment 562013 [details] [diff] [review]
allow sut_tools to use devicemanagerSUT (1.0)

in order for talos to run devicemanager via ADB, we needed to refactor devicemanager into devicemanagerSUT and devicemanagerADB.  As of bug 687974, we have support in talos for this.  Before this can land on the mobile side of things, we need to update sut_tools to instantiate devicemanagerSUT instead of devicemanager.  

In addition, we need to update the script that links devicemanager so it links to devicemanager*.
Attachment #562013 - Flags: review?(bear)
Attachment #562013 - Flags: feedback?(aki)
Summary: udpate sut_tools to reference devicemanagerSUT instead of devicemanager → update sut_tools to reference devicemanagerSUT instead of devicemanager
(Assignee)

Comment 1

7 years ago
Comment on attachment 562013 [details] [diff] [review]
allow sut_tools to use devicemanagerSUT (1.0)

why are we importing all three if we are only using one of three?

is the plan to make it so we only have to import devicemanager and then decide which variant is needed via constructor and/or parameters?
Attachment #562013 - Flags: review?(bear) → review-
devicemanager is the base class to devicemanagerSUT.  I thought I would put the ADB stuff in if we wanted to go that route in the future for some/all scripts.  I can remove the import devicemanagerADB and we can add it later when we want it.
as per a conversation with :bear, he wasn't aware that this is how it currently works in reftest/mochitest.  His ideal world is a good vision (import devicemanager and it figures out which version to use), but that will require some work in the near future.

the only question I have is should I go ahead and remove the devicemanagerADB import, or leave it in there for future versions/development.
(Assignee)

Comment 4

7 years ago
Comment on attachment 562013 [details] [diff] [review]
allow sut_tools to use devicemanagerSUT (1.0)

per conversation with jmaher - changing to r+

the import, while kinda "smelly" ;), is how it is currently being used in other ateam code so we will need to follow that style for the short term.
Attachment #562013 - Flags: review- → review+
Assignee: nobody → bear

Comment 5

7 years ago
(In reply to Joel Maher (:jmaher) from comment #2)
> devicemanager is the base class to devicemanagerSUT.  I thought I would put
> the ADB stuff in if we wanted to go that route in the future for some/all
> scripts.  I can remove the import devicemanagerADB and we can add it later
> when we want it.

We don't need devicemanager ever, since devicemanagerADB and devicemanagerSUT import/inherit what we need.  I'm writing device_talosrunner to use devicemanagerADB; the scripts only need devicemanagerSUT unless we switch over.
Created attachment 562074 [details] [diff] [review]
allow sut_tools to use devicemanagerSUT (2.0)

ok, updated patch with feedback from aki, SUT only!
Attachment #562013 - Attachment is obsolete: true
Attachment #562013 - Flags: feedback?(aki)
Attachment #562074 - Flags: review?(aki)

Comment 7

7 years ago
Comment on attachment 562074 [details] [diff] [review]
allow sut_tools to use devicemanagerSUT (2.0)

If we:

  import devicemanagerSUT as devicemanager

we could then change the

  except devicemanagerSUT.DMError, e:

lines back to

  except devicemanager.DMError, e:

This is also true of dm = devicemanagerSUT.DeviceManagerSUT(sys.argv[1]) .
If we renamed devicemanager.DeviceManager to devicemanager.DeviceManagerBase (or something), and named devicemanagerSUT.DeviceManagerSUT to devicemanagerSUT.DeviceManager, then the only lines that need changing are the import lines.

If devicemanagerADB is completely api compatible with devicemanagerSUT, then to switch all you have to do is change the import lines again.

This works, however.
Attachment #562074 - Flags: review?(aki) → review+
(Assignee)

Comment 8

7 years ago
Comment on attachment 562074 [details] [diff] [review]
allow sut_tools to use devicemanagerSUT (2.0)

committed changeset 1838:d784cb34b267
Attachment #562074 - Flags: checked-in+
(Assignee)

Comment 9

7 years ago
Created attachment 563557 [details] [diff] [review]
adjust new foopy helper scripts with latest sut_tool devicemanager update

new devicemanager[SUT|ADB].py files require symlinking
Attachment #563557 - Flags: review?(aki)

Updated

7 years ago
Attachment #563557 - Flags: review?(aki) → review+
(Assignee)

Comment 10

7 years ago
Comment on attachment 563557 [details] [diff] [review]
adjust new foopy helper scripts with latest sut_tool devicemanager update

committed changeset 1839:ae083c31d789
Attachment #563557 - Flags: checked-in+
(Assignee)

Comment 11

7 years ago
foopy's have been updated
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.