From f52c52575ba3b8887b389e4582e3a98e3d3a6934 Mon Sep 17 00:00:00 2001 From: rzaitov Date: Tue, 12 Nov 2013 12:08:46 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=84=D0=B8=D0=BA=D1=81=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=B1=D1=8D=D0=BA=D0=B0=D0=BF=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TouchinBuild/Tests/ManualTests/create_backup_test.py | 2 +- .../commands/BaseBackupCommand/BaseBackupCommand.py | 8 ++++++-- .../commands/BaseBackupCommand/CreateBackupCommand.py | 2 +- scripts/TouchinBuild/run_manual_tests.py | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) 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