diff --git a/scripts/TouchinBuild/Tests/ManualTests/create_backup_test.py b/scripts/TouchinBuild/Tests/ManualTests/create_backup_test.py index 99303cc..48bc235 100644 --- a/scripts/TouchinBuild/Tests/ManualTests/create_backup_test.py +++ b/scripts/TouchinBuild/Tests/ManualTests/create_backup_test.py @@ -1,6 +1,6 @@ from CommandBuilders.CreateBackupCommandBuilder import CreateBackupCommandBuilder -line = "create backup for '.'" +line = "create backup for 'BuildSample'" cmdBuilder = CreateBackupCommandBuilder() command = cmdBuilder.getCommandFor(line) diff --git a/scripts/TouchinBuild/commands/BaseBackupCommand/BaseBackupCommand.py b/scripts/TouchinBuild/commands/BaseBackupCommand/BaseBackupCommand.py index 45acc23..a8f102d 100644 --- a/scripts/TouchinBuild/commands/BaseBackupCommand/BaseBackupCommand.py +++ b/scripts/TouchinBuild/commands/BaseBackupCommand/BaseBackupCommand.py @@ -11,8 +11,12 @@ class BaseBackupCommand: return self.getAbs(self.folderPath) def getAbsDst(self): - srcDirName = os.path.dirname(self.folderPath) - return self.getAbs('backup'.format(srcDirName)) + absFolderPath = self.getAbs(self.folderPath) + srcDirName = os.path.basename(absFolderPath) + absParentDir = os.path.dirname(absFolderPath) + dstAbs = self.getAbs(os.path.join(absParentDir, 'backup.{0}'.format(srcDirName))) + + return dstAbs def getAbs(self, path): return os.path.abspath(path) \ No newline at end of file diff --git a/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py b/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py index 516e12b..6658758 100644 --- a/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py +++ b/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py @@ -13,4 +13,4 @@ class CreateBackupCommand(BaseBackupCommand): print src, backupDir shutil.rmtree(backupDir, ignore_errors=True) - shutil.copytree(src, backupDir, symlinks=False) + shutil.copytree(src, backupDir, symlinks=False) \ No newline at end of file diff --git a/scripts/TouchinBuild/run_manual_tests.py b/scripts/TouchinBuild/run_manual_tests.py index c0fff48..6ae322c 100644 --- a/scripts/TouchinBuild/run_manual_tests.py +++ b/scripts/TouchinBuild/run_manual_tests.py @@ -9,8 +9,8 @@ os.chdir(baseDir) #import Tests.ManualTests.csproj_test #import ManualTests.info_plist_test #import ManualTests.copy_test -import Tests.ManualTests.create_backup_test -#import Tests.ManualTests.delete_backup_test +#import Tests.ManualTests.create_backup_test +import Tests.ManualTests.delete_backup_test #import Tests.ManualTests.restore_backup_test #import ManualTests.csproj_test #import ManualTests.run_sh_command