Closed Bug 1067403 Opened 10 years ago Closed 10 years ago

Improve mozbench post-run cleanup

Categories

(Testing :: General, defect)

All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dminor, Assigned: mcc.ricardo, Mentored)

References

Details

(Whiteboard: [good next bug][lang=python])

Bug 1056094 added a post-run cleanup function that removes the installation directory.

It can be enhanced in two ways:
1) Remove the downloaded installer.
2) At the moment we're using an if/else to determine where the installation directory is based on operating system. It would be better to use the path to the firefox binary returned by mozinstall instead.

Thanks!
Sounds much cleaner that way.
As it turns out, 'rm -rf' fails on the windows test machine :)
We might have better luck with shutil.rmtree or something similar.
Well spotted! Makes sense. The equivalent on windows should be something like 'deltree' or something similar. Let's look into shutil.rmtree then :)
Just sent you a pull request.

shutil.rmtree looked like a charm :) Tested in OS X and Ubuntu.
Thanks! Also working well on Windows.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.