Closed Bug 795021 Opened 12 years ago Closed 11 years ago

talos should depend on mozfile

Categories

(Testing :: Talos, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: k0scist, Assigned: sambuddhabasu1)

References

Details

Attachments

(3 files)

We use shutil.rmtree some places in talos. Sometimes it fails: https://bugzilla.mozilla.org/show_bug.cgi?id=509439 Instead we should use mozfile.rmtree which should be more reliable
Blocks: 687549
Blocks: 509439
I would like to work on this bug. Please assign it to me.
Assignee: nobody → sammygamer
Comment on attachment 8375791 [details] [diff] [review] Replace shutil.rmtree with mozfile.rmtree Review of attachment 8375791 [details] [diff] [review]: ----------------------------------------------------------------- we are using mozfile 0.3 in create_talos_zip.py, lets make that 1.1 as indicated in setup.py. Please address the remaining comments below. ::: create_talos_zip.py @@ +204,5 @@ > assert os.path.exists(path), "'%s' not found" % path > os.remove(path) > for newdir in newdirs: > if os.path.exists(newdir): > + mozfile.rmtree(newdir) we do not import mozfile in here, I am fine not adjusting this one. ::: setup.py @@ +13,5 @@ > dependencies = ['PyYAML', > 'mozlog', > 'mozcrash == 0.9', > 'mozdevice == 0.26', > + 'mozfile', I would like to make this a specific verision, lets use 1.1 as that is the latest version. ::: talos/ffsetup.py @@ +182,5 @@ > if tmpdir is None or unpack.lower() == 'true': #install addon unpacked > addon_path = os.path.join(profile_path, 'extensions', 'staged', addon_id) > #if an old copy is already installed, remove it > if os.path.isdir(addon_path): > + mozfile.rmtree(addon_path, ignore_errors=True) I don't believe we support ignore_errors in mozfile: https://github.com/mozilla/mozbase/blob/master/mozfile/mozfile/mozfile.py#L120
Attachment #8375791 - Flags: review?(jmaher) → review-
The necessary changes have been made.
Attachment #8376334 - Flags: review?(jmaher)
Comment on attachment 8376334 [details] [diff] [review] Replace shutil.rmtree with mozfile.rmtree Review of attachment 8376334 [details] [diff] [review]: ----------------------------------------------------------------- we need to adjust the hardcoded version of 0.3 in create_talos_zips.py and make it 1.1
Attachment #8376334 - Flags: review?(jmaher) → review-
Mozfile 1.1 has been included in place of 0.3. Also, shutil.rmtree has been replaced with mozfile.rmtree
Attachment #8376445 - Flags: review?(jmaher)
Comment on attachment 8376445 [details] [diff] [review] Replace shutil.rmtree with mozfile.rmtree Review of attachment 8376445 [details] [diff] [review]: ----------------------------------------------------------------- thanks, I need to verify this works on all platforms.
Attachment #8376445 - Flags: review?(jmaher) → review+
Depends on: 973948
https://hg.mozilla.org/build/talos/rev/c0fb63ff9333 I am planning on deploying talos to mozilla-inbound tomorrow.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: