SUT agent: pushDir does not follow links

RESOLVED FIXED in mozilla15

Status

Testing
General
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gbrown, Assigned: gbrown)

Tracking

unspecified
mozilla15
x86
Android
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
devicemanagerSUT's pushDir does not follow links in directories the way that devicemanagerADB's pushDir does. Notably, the xpcshell directory (link) <objdir>/_tests/xpcshell/netwerk/test/unit/data is not pushed to the device when pushing the netwerk/test directory.
(Assignee)

Comment 1

6 years ago
When links *are* followed, a new problem arises. Some of the new files (files previously not pushed because they are behind links) cause a pushDir failure because they contain the ^ character. eg several files under netwerk/test/httpserver/test/data/name-scheme. The problem is that there is a regex test in dirExists which interprets the ^ characters; escaping the ^ characters fixes the problem.
(Assignee)

Updated

6 years ago
Blocks: 747162
(Assignee)

Comment 2

6 years ago
Created attachment 618339 [details] [diff] [review]
follow links when pushing files; also allow ^ character in filename
(Assignee)

Updated

6 years ago
Attachment #618339 - Flags: review?(jmaher)
Comment on attachment 618339 [details] [diff] [review]
follow links when pushing files; also allow ^ character in filename

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

some simple nits below.

::: build/mobile/devicemanagerSUT.py
@@ +406,5 @@
>    #  success: remoteDir
>    #  failure: None
>    def pushDir(self, localDir, remoteDir):
>      if (self.debug >= 2): print "pushing directory: %s to %s" % (localDir, remoteDir)
> +    for root, dirs, files in os.walk(localDir, followlinks='true'):

I believe this should be 'followlinks=True' instead of assigning it to a string.

@@ +427,5 @@
>    # returns:
>    #  success: True
>    #  failure: False
>    def dirExists(self, dirname):
> +    match = ".*" + dirname.replace('^', '\\^') + "$"

not sure we need the '\\^' here.  I believe '\^' will work.
Attachment #618339 - Flags: review?(jmaher) → review+
(Assignee)

Comment 4

6 years ago
Created attachment 618641 [details] [diff] [review]
follow
Attachment #618339 - Attachment is obsolete: true
Attachment #618641 - Flags: review+
(Assignee)

Comment 5

6 years ago
Created attachment 618643 [details] [diff] [review]
follow links when pushing files; also allow ^ character in filenames

r=jmaher

Changed to followlinks=True and \^ - thanks!

(The same followlinks='true' code was in devicemanagerADB, so I updated it there as well!)
Attachment #618641 - Attachment is obsolete: true
Attachment #618643 - Flags: review+
(Assignee)

Updated

6 years ago
No longer blocks: 747162
(Assignee)

Updated

6 years ago
Keywords: checkin-needed
OS: Mac OS X → Android
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd8e5cd87d8e
Flags: in-testsuite-
Keywords: checkin-needed
Target Milestone: --- → mozilla15
https://hg.mozilla.org/mozilla-central/rev/cd8e5cd87d8e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.