Commit 380037f8 authored by Julien Muchembled's avatar Julien Muchembled

erp5testnode: clean up old instance root folder

This is backward compatibility code for previous commit.
parent fb31fb52
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
############################################################################## ##############################################################################
import os import os
import pkg_resources import pkg_resources
import shutil
import slapos.slap import slapos.slap
import subprocess import subprocess
import time import time
...@@ -53,6 +54,7 @@ class SlapOSControler(object): ...@@ -53,6 +54,7 @@ class SlapOSControler(object):
createFolder(shared) createFolder(shared)
self.shared_part_list = self.shared_part_list + [shared] self.shared_part_list = self.shared_part_list + [shared]
self.old_instance_root = os.path.join(working_directory, 'inst')
self.instance_root = os.path.join(working_directory, 'i') self.instance_root = os.path.join(working_directory, 'i')
self.slapos_config = os.path.join(working_directory, 'slapos.cfg') self.slapos_config = os.path.join(working_directory, 'slapos.cfg')
self.proxy_database = os.path.join(working_directory, 'proxy.db') self.proxy_database = os.path.join(working_directory, 'proxy.db')
...@@ -277,6 +279,7 @@ class SlapOSControler(object): ...@@ -277,6 +279,7 @@ class SlapOSControler(object):
self._resetSoftware() self._resetSoftware()
else: else:
createFolder(self.software_root) createFolder(self.software_root)
shutil.rmtree(self.old_instance_root, True) # BBB
  • Shouldn't we use erp5.util.testnode.Utils.rmtree here ?

    with software release test suites, there are probably files/folders with permissions issues.

    /cc @xavier_thompson

  • Oops. And we wanted to release erp5.util quickly.

    Fixed in master. I think we can wait to release.

  • slapos!992 (merged) depends on erp5.util being released.

Please register or sign in to reply
instance_root = self.instance_root instance_root = self.instance_root
# Delete any existing partition in order to not get its data (ex. # Delete any existing partition in order to not get its data (ex.
# MySQL DB content) from previous runs. To support changes of partition # MySQL DB content) from previous runs. To support changes of partition
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment