os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/BUR.script
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/scripts/BUR.script	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,227 @@
     1.4 +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// @file
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +//! @SYMTestSuiteName PDS-TEF-SQL-SUITE
    1.22 +//! @SYMScriptTestEnvironment TEF
    1.23 +//! @internalComponent
    1.24 +//! @test
    1.25 +
    1.26 +PRINT Run SQL Tests
    1.27 +
    1.28 +LOAD_SUITE te_SQL_Suite
    1.29 +LOAD_SUITE te_SQL_Suite_cap2
    1.30 +LOAD_SUITE BURTestServer
    1.31 +
    1.32 +RUN_UTILS MkDir c:\private\
    1.33 +RUN_UTILS MkDir c:\private\102827c7\
    1.34 +RUN_UTILS MkDir c:\private\102827c8\
    1.35 +RUN_UTILS CopyFile z:\TEF_SQL\TestData\backup_registration.xml c:\private\102827c7\backup_registration.xml
    1.36 +RUN_UTILS CopyFile z:\TEF_SQL\TestData\backup_registration.xml c:\private\102827c8\backup_registration.xml
    1.37 +
    1.38 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    1.39 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
    1.40 +
    1.41 +START_TESTCASE SYSLIB-SQL-CIT-1834
    1.42 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1834
    1.43 +//! @SYMTestCaseDesc  Backup and restore with no change
    1.44 +//! @SYMTestPriority  High
    1.45 +//! @SYMTestActions   See description and the config file.
    1.46 +//! @SYMTestExpectedResults
    1.47 +//!                  The test looks for errors and content
    1.48 +//!                  within the database. If these are not seen test errors
    1.49 +//!                  will be generated.
    1.50 +//!                  
    1.51 +//! @SYMREQ           REQ5906
    1.52 +
    1.53 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
    1.54 +	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
    1.55 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    1.56 +	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
    1.57 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    1.58 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
    1.59 +END_TESTCASE SYSLIB-SQL-CIT-1834
    1.60 +
    1.61 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    1.62 +RUN_UTILS DeleteDirectory c:\BackupArchive\
    1.63 +
    1.64 +START_TESTCASE SYSLIB-SQL-CIT-1835
    1.65 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1835
    1.66 +//! @SYMTestCaseDesc  Backup and restore with database file deleted
    1.67 +//! @SYMTestPriority  High
    1.68 +//! @SYMTestActions   See description and the config file.
    1.69 +//! @SYMTestExpectedResults
    1.70 +//!                  The test looks for errors and content
    1.71 +//!                  within the database. If these are not seen test errors
    1.72 +//!                  will be generated.
    1.73 +//!                  
    1.74 +//! @SYMREQ           REQ5906
    1.75 +	
    1.76 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup	
    1.77 +	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
    1.78 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    1.79 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    1.80 +	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
    1.81 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
    1.82 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
    1.83 +END_TESTCASE SYSLIB-SQL-CIT-1835
    1.84 +
    1.85 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
    1.86 +RUN_UTILS DeleteDirectory c:\BackupArchive\
    1.87 +
    1.88 +START_TESTCASE SYSLIB-SQL-CIT-1836
    1.89 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1836
    1.90 +//! @SYMTestCaseDesc  Backup and restore with database file modified
    1.91 +//! @SYMTestPriority  High
    1.92 +//! @SYMTestActions   See description and the config file.
    1.93 +//! @SYMTestExpectedResults
    1.94 +//!                  The test looks for errors and content
    1.95 +//!                  within the database. If these are not seen test errors
    1.96 +//!                  will be generated.
    1.97 +//!                  
    1.98 +//! @SYMREQ           REQ5906
    1.99 +
   1.100 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
   1.101 +	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
   1.102 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.103 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini modify
   1.104 +	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   1.105 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.106 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
   1.107 +END_TESTCASE SYSLIB-SQL-CIT-1836
   1.108 +
   1.109 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   1.110 +RUN_UTILS DeleteDirectory c:\BackupArchive\
   1.111 +
   1.112 +START_TESTCASE SYSLIB-SQL-CIT-1837
   1.113 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1837
   1.114 +//! @SYMTestCaseDesc  Backup and restore with database file corrupted
   1.115 +//! @SYMTestPriority  High
   1.116 +//! @SYMTestActions   See description and the config file.
   1.117 +//! @SYMTestExpectedResults
   1.118 +//!                  The test looks for errors and content
   1.119 +//!                  within the database. If these are not seen test errors
   1.120 +//!                  will be generated.
   1.121 +//!                  
   1.122 +//! @SYMREQ           REQ5906
   1.123 +
   1.124 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
   1.125 +	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
   1.126 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.127 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db	
   1.128 +	RUN_UTILS CopyFile z:\TEF_SQL\TestData\[102827c7]corrupt.db c:\private\10281e17\[102827c7]bur.db
   1.129 +	RUN_UTILS MakeReadWrite c:\private\10281e17\[102827c7]bur.db
   1.130 +	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   1.131 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.132 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
   1.133 +END_TESTCASE SYSLIB-SQL-CIT-1837
   1.134 +
   1.135 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   1.136 +RUN_UTILS DeleteDirectory c:\BackupArchive\
   1.137 +
   1.138 +START_TESTCASE SYSLIB-SQL-CIT-1838
   1.139 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1838
   1.140 +//! @SYMTestCaseDesc  Backup and restore with database file from 2 data owners
   1.141 +//! @SYMTestPriority  High
   1.142 +//! @SYMTestActions   See description and the config file.
   1.143 +//! @SYMTestExpectedResults
   1.144 +//!                  The test looks for errors and content
   1.145 +//!                  within the database. If these are not seen test errors
   1.146 +//!                  will be generated.
   1.147 +//!                  
   1.148 +//! @SYMREQ           REQ5906
   1.149 +
   1.150 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup
   1.151 +	RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\BUR.ini setup2
   1.152 +	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur2
   1.153 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.154 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   1.155 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
   1.156 +	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur2
   1.157 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.158 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check
   1.159 +	RUN_TEST_STEP 100 te_SQL_Suite_cap2 CSQLDDT z:\TEF_SQL\BUR.ini check2
   1.160 +END_TESTCASE SYSLIB-SQL-CIT-1838
   1.161 +
   1.162 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   1.163 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
   1.164 +RUN_UTILS DeleteDirectory c:\BackupArchive\
   1.165 +
   1.166 +START_TESTCASE SYSLIB-SQL-CIT-1839-0001
   1.167 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-1839-0001
   1.168 +//! @SYMTestCaseDesc  Backup and restore with 3 database files
   1.169 +//! @SYMTestPriority  High
   1.170 +//! @SYMTestActions   See description and the config file.
   1.171 +//! @SYMTestExpectedResults
   1.172 +//!                  The test looks for errors and content
   1.173 +//!                  within the database. If these are not seen test errors
   1.174 +//!                  will be generated.
   1.175 +//!                  
   1.176 +//! @SYMREQ           REQ5906
   1.177 +
   1.178 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup3
   1.179 +	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
   1.180 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.181 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur1.db
   1.182 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur2.db
   1.183 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur3.db
   1.184 +	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   1.185 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.186 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check3
   1.187 +END_TESTCASE SYSLIB-SQL-CIT-1839-0001
   1.188 +
   1.189 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur1.db
   1.190 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur2.db
   1.191 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur3.db
   1.192 +
   1.193 +START_TESTCASE SYSLIB-SQL-CIT-4026
   1.194 +//! @SYMTestCaseID    SYSLIB-SQL-CIT-4026
   1.195 +//! @SYMTestCaseDesc  Backup and restore a database file (with no extension)
   1.196 +//! @SYMTestPriority  High
   1.197 +//! @SYMTestActions   See description and the config file.
   1.198 +//! @SYMTestExpectedResults
   1.199 +//!                  The test looks for errors and content
   1.200 +//!                  within the database. If these are not seen test errors
   1.201 +//!                  will be generated.
   1.202 +//!                  
   1.203 +//! @SYMDEF	     INC118192
   1.204 +//!              PDEF118675
   1.205 +//!              PDEF118676
   1.206 +
   1.207 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini setup4
   1.208 +	RUN_TEST_STEP -1 BURTestServer TestBackup z:\TEF_SQL\BUR.ini bur
   1.209 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.210 +	RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]118192
   1.211 +	RUN_TEST_STEP -1 BURTestServer TestRestore z:\TEF_SQL\BUR.ini bur
   1.212 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini wait
   1.213 +	RUN_TEST_STEP 100 te_SQL_Suite CSQLDDT z:\TEF_SQL\BUR.ini check4
   1.214 +END_TESTCASE SYSLIB-SQL-CIT-4026
   1.215 +
   1.216 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]118192
   1.217 +RUN_UTILS DeleteDirectory c:\BackupArchive
   1.218 +
   1.219 +//cleanup
   1.220 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c7]bur.db
   1.221 +RUN_UTILS DeleteFile c:\private\10281e17\[102827c8]bur.db
   1.222 +RUN_UTILS MakeReadWrite c:\private\102827c7\backup_registration.xml
   1.223 +RUN_UTILS MakeReadWrite c:\private\102827c8\backup_registration.xml
   1.224 +RUN_UTILS DeleteFile c:\private\102827c7\backup_registration.xml
   1.225 +RUN_UTILS DeleteFile c:\private\102827c8\backup_registration.xml
   1.226 +RUN_UTILS DeleteDirectory c:\BackupArchive\
   1.227 +RUN_UTILS DeleteDirectory c:\private\102827c7\
   1.228 +RUN_UTILS DeleteDirectory c:\private\102827c8\
   1.229 +
   1.230 +