Merge lp:~le-chi-thu/lava-test/add-reset-command into lp:lava-test/0.0
Proposed by
Le Chi Thu
Status: | Merged |
---|---|
Merged at revision: | 128 |
Proposed branch: | lp:~le-chi-thu/lava-test/add-reset-command |
Merge into: | lp:lava-test/0.0 |
Diff against target: |
69 lines (+23/-3) 2 files modified
lava_test/commands.py (+21/-2) setup.py (+2/-1) |
To merge this branch: | bzr merge lp:~le-chi-thu/lava-test/add-reset-command |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zygmunt Krynicki (community) | Approve | ||
Le Chi Thu (community) | Needs Resubmitting | ||
Review via email: mp+96013@code.launchpad.net |
Description of the change
When new test job run with out deploying a new test image, there are old test result, installed tests and cached out-of-tree tests in the test image file system you want to removed. This command will be used to remove them.
To post a comment you must log in.
30 + configdir configdir) installdir installdir) resultsdir resultsdir) instance( )
31 + def invoke(self):
32 + print "Delete " + self._config.
33 + os.system("rm -rf " + self._config.
34 + print "Delete " + self._config.
35 + os.system("rm -rf " + self._config.
36 + print "Delete " + self._config.
37 + os.system("rm -rf " + self._config.
38 + cache = Cache.get_
39 + print "Delete " + cache.cache_dir
40 + os.system("rm -rf " + cache.cache_dir)
Please use shutil.rmtree(), os.system() is wrong and error prone on many levels.
Otherwise this is okay