sl@0
|
1 |
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// @file
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
PRINT Run SQL Tests
|
sl@0
|
19 |
|
sl@0
|
20 |
LOAD_SUITE te_SQL_Suite
|
sl@0
|
21 |
|
sl@0
|
22 |
RUN_UTILS DeleteFile E:\Robustness*.db
|
sl@0
|
23 |
RUN_UTILS DeleteFile T:\Robustness*.db
|
sl@0
|
24 |
RUN_UTILS DeleteFile C:\Robustness*.db
|
sl@0
|
25 |
RUN_UTILS DeleteFile E:\Robustness*.db-journal
|
sl@0
|
26 |
RUN_UTILS DeleteFile T:\Robustness*.db-journal
|
sl@0
|
27 |
RUN_UTILS DeleteFile C:\Robustness*.db-journal
|
sl@0
|
28 |
RUN_UTILS DeleteFile T:\fillfile.txt
|
sl@0
|
29 |
RUN_UTILS DeleteFile T:\fillfile2.txt
|
sl@0
|
30 |
RUN_UTILS DeleteFile T:\fillfile4M.txt
|
sl@0
|
31 |
RUN_UTILS DeleteFile E:\fillfile.txt
|
sl@0
|
32 |
RUN_UTILS DeleteFile E:\fillfile2.txt
|
sl@0
|
33 |
RUN_UTILS DeleteFile E:\fillfile4M.txt
|
sl@0
|
34 |
RUN_UTILS DeleteFile T:\fillDisk*.txt
|
sl@0
|
35 |
RUN_UTILS DeleteFile E:\fillDisk*.txt
|
sl@0
|
36 |
|
sl@0
|
37 |
|
sl@0
|
38 |
START_TESTCASE SYSLIB-SQL-CIT-3348
|
sl@0
|
39 |
//! @SYMTestCaseID SYSLIB-SQL-CIT-3348
|
sl@0
|
40 |
//! @SYMTestCaseDesc Not strictly an SQL test. This step fills the disk to
|
sl@0
|
41 |
//! within 4M of full an leaves that file lying around. This
|
sl@0
|
42 |
//! improves the performance of the subsequent OOD tests
|
sl@0
|
43 |
//! and is required for reliable behaviour within the DABS
|
sl@0
|
44 |
//! framework (due to possible timeout issues). The large
|
sl@0
|
45 |
//! file is removed by the script at the end.
|
sl@0
|
46 |
//! This MUST be the first test to execute in the script.
|
sl@0
|
47 |
//! Note that this step does nothing at all on emulator -
|
sl@0
|
48 |
//! that uses the T: drive which is already < 4M.
|
sl@0
|
49 |
//! @SYMTestPriority High
|
sl@0
|
50 |
//! @SYMTestActions See description and the config file, also the code.
|
sl@0
|
51 |
//! @SYMTestExpectedResults
|
sl@0
|
52 |
//! A PASS should be generated.
|
sl@0
|
53 |
//! @SYMDEF DEF095562
|
sl@0
|
54 |
|
sl@0
|
55 |
RUN_TEST_STEP 900 te_SQL_Suite CSQLCDT z:\TEF_SQL\Robustness.ini FillDisk4M
|
sl@0
|
56 |
END_TESTCASE SYSLIB-SQL-CIT-3348
|
sl@0
|
57 |
|
sl@0
|
58 |
START_TESTCASE SYSLIB-SQL-CIT-1705
|
sl@0
|
59 |
//! @SYMTestCaseID SYSLIB-SQL-CIT-1705
|
sl@0
|
60 |
//! @SYMTestCaseDesc Adds a few records to a table in a new database. Begins
|
sl@0
|
61 |
//! a transaction and then fills the disk. When this fails
|
sl@0
|
62 |
//! with KErrDiskFull, database is closed and re-opened. This
|
sl@0
|
63 |
//! is all that can be done with disk full unless space has
|
sl@0
|
64 |
//! been reserved. Free up a bit of disk and then check
|
sl@0
|
65 |
//! the initial records to validate the db is still usable.
|
sl@0
|
66 |
//! Further records are then added and checked.
|
sl@0
|
67 |
//! @SYMTestPriority High
|
sl@0
|
68 |
//! @SYMTestActions See description and the config file, also the code.
|
sl@0
|
69 |
//! @SYMTestExpectedResults
|
sl@0
|
70 |
//! A PASS should be generated.
|
sl@0
|
71 |
//! @SYMREQ REQ5792
|
sl@0
|
72 |
|
sl@0
|
73 |
PRINT <font size=5 color=AF0000>MMC card on E:\ required on hardware!! </font>
|
sl@0
|
74 |
RUN_TEST_STEP 900 te_SQL_Suite CSQLCDT z:\TEF_SQL\Robustness.ini Top
|
sl@0
|
75 |
END_TESTCASE SYSLIB-SQL-CIT-1705
|
sl@0
|
76 |
|
sl@0
|
77 |
RUN_UTILS DeleteFile E:\Robustness*.db
|
sl@0
|
78 |
RUN_UTILS DeleteFile T:\Robustness*.db
|
sl@0
|
79 |
RUN_UTILS DeleteFile C:\Robustness*.db
|
sl@0
|
80 |
RUN_UTILS DeleteFile E:\Robustness*.db-journal
|
sl@0
|
81 |
RUN_UTILS DeleteFile T:\Robustness*.db-journal
|
sl@0
|
82 |
RUN_UTILS DeleteFile C:\Robustness*.db-journal
|
sl@0
|
83 |
RUN_UTILS DeleteFile T:\fillfile.txt
|
sl@0
|
84 |
RUN_UTILS DeleteFile E:\fillfile.txt
|
sl@0
|
85 |
RUN_UTILS DeleteFile T:\fillfile2.txt
|
sl@0
|
86 |
RUN_UTILS DeleteFile E:\fillfile2.txt
|
sl@0
|
87 |
|
sl@0
|
88 |
START_TESTCASE SYSLIB-SQL-CIT-1704
|
sl@0
|
89 |
//! @SYMTestCaseID SYSLIB-SQL-CIT-1704
|
sl@0
|
90 |
//! @SYMTestCaseDesc Does an attach of a db on another drive and then fills
|
sl@0
|
91 |
//! the disk that resides on. Verifies that appropriate
|
sl@0
|
92 |
//! errors are returned on writing to it. Also check for
|
sl@0
|
93 |
//! 'expired' RSqlStatement after DETACH and verifies that
|
sl@0
|
94 |
//! the previously attached database can be deleted despite
|
sl@0
|
95 |
//! having no space.
|
sl@0
|
96 |
//! @SYMTestPriority High
|
sl@0
|
97 |
//! @SYMTestActions See description and the config file, also the code.
|
sl@0
|
98 |
//! @SYMTestExpectedResults
|
sl@0
|
99 |
//! A PASS should be generated.
|
sl@0
|
100 |
//! @SYMREQ REQ5792
|
sl@0
|
101 |
|
sl@0
|
102 |
PRINT <font size=5 color=0000AF>INFO: MMC card on E:\ required on hardware!! </font>
|
sl@0
|
103 |
RUN_TEST_STEP 900 te_SQL_Suite CSQLCDT z:\TEF_SQL\Robustness.ini Attach
|
sl@0
|
104 |
END_TESTCASE SYSLIB-SQL-CIT-1704
|
sl@0
|
105 |
|
sl@0
|
106 |
RUN_UTILS DeleteFile E:\Robustness*.db
|
sl@0
|
107 |
RUN_UTILS DeleteFile T:\Robustness*.db
|
sl@0
|
108 |
RUN_UTILS DeleteFile C:\Robustness*.db
|
sl@0
|
109 |
RUN_UTILS DeleteFile E:\Robustness*.db-journal
|
sl@0
|
110 |
RUN_UTILS DeleteFile T:\Robustness*.db-journal
|
sl@0
|
111 |
RUN_UTILS DeleteFile C:\Robustness*.db-journal
|
sl@0
|
112 |
RUN_UTILS DeleteFile T:\fillfile.txt
|
sl@0
|
113 |
RUN_UTILS DeleteFile E:\fillfile.txt
|
sl@0
|
114 |
RUN_UTILS DeleteFile T:\fillfile2.txt
|
sl@0
|
115 |
RUN_UTILS DeleteFile E:\fillfile2.txt
|
sl@0
|
116 |
|
sl@0
|
117 |
START_TESTCASE SYSLIB-SQL-CIT-1741
|
sl@0
|
118 |
//! @SYMTestCaseID SYSLIB-SQL-CIT-1741
|
sl@0
|
119 |
//! @SYMTestCaseDesc 'FillTest' adds some data into its database and checks
|
sl@0
|
120 |
//! it. It then triggers 'DeleteTest' and waits.
|
sl@0
|
121 |
//! DeleteTest creates its own, separate database.
|
sl@0
|
122 |
//! It then reserves space, and then fills the disk
|
sl@0
|
123 |
//! with writes to a database table. Once it receives
|
sl@0
|
124 |
//! KErrDiskFull it enables the reserved disk space and
|
sl@0
|
125 |
//! attempts to add two more records - this should be
|
sl@0
|
126 |
//! successful. It then signals 'FillTest' back, and waits.
|
sl@0
|
127 |
//! 'FillTest' attempts to add records to its own db. These
|
sl@0
|
128 |
//! are small, so a number work. It then receives KErrDiskFull.
|
sl@0
|
129 |
//! DeleteTest is signalled and FillTest waits.
|
sl@0
|
130 |
//! 'DeleteTest' attempts to delete a few records. This should
|
sl@0
|
131 |
//! be successful - we have reserved space. Reserved space is
|
sl@0
|
132 |
//! then released by 'DeleteTest', 'FillTest' is signalled
|
sl@0
|
133 |
//! and 'DeleteTest' waits.
|
sl@0
|
134 |
//! 'FillTest' had no reserved space so just closes it's db,
|
sl@0
|
135 |
//! deletes it, signals 'DeleteTest' back and dies.
|
sl@0
|
136 |
//! 'DeleteTest' releases reserved space a second time
|
sl@0
|
137 |
//! (which gives no error) and cleans up.
|
sl@0
|
138 |
//!
|
sl@0
|
139 |
//! @SYMTestPriority High
|
sl@0
|
140 |
//! @SYMTestActions See description and the config file, also the code.
|
sl@0
|
141 |
//! @SYMTestExpectedResults
|
sl@0
|
142 |
//! A PASS should be generated.
|
sl@0
|
143 |
//! @SYMREQ REQ5792
|
sl@0
|
144 |
//
|
sl@0
|
145 |
|
sl@0
|
146 |
PRINT <font size=5 color=AF0000>MMC card on E:\ required on hardware!! </font>
|
sl@0
|
147 |
CONCURRENT
|
sl@0
|
148 |
// DeleteTest's first action is to wait for a signal from FillTest. It *must*
|
sl@0
|
149 |
// be running when FillTest sends it signal, so lets have it first..
|
sl@0
|
150 |
RUN_TEST_STEP 1800 te_SQL_Suite CSQLCDT z:\TEF_SQL\Robustness.ini DeleteTest
|
sl@0
|
151 |
RUN_TEST_STEP 1800 te_SQL_Suite CSQLCDT z:\TEF_SQL\Robustness.ini FillTest
|
sl@0
|
152 |
END_TESTCASE SYSLIB-SQL-CIT-1741
|
sl@0
|
153 |
|
sl@0
|
154 |
RUN_UTILS DeleteFile E:\Robustness*.db
|
sl@0
|
155 |
RUN_UTILS DeleteFile T:\Robustness*.db
|
sl@0
|
156 |
RUN_UTILS DeleteFile C:\Robustness*.db
|
sl@0
|
157 |
RUN_UTILS DeleteFile E:\Robustness*.db-journal
|
sl@0
|
158 |
RUN_UTILS DeleteFile T:\Robustness*.db-journal
|
sl@0
|
159 |
RUN_UTILS DeleteFile C:\Robustness*.db-journal
|
sl@0
|
160 |
RUN_UTILS DeleteFile T:\fillfile.txt
|
sl@0
|
161 |
RUN_UTILS DeleteFile E:\fillfile.txt
|
sl@0
|
162 |
RUN_UTILS DeleteFile T:\fillfile2.txt
|
sl@0
|
163 |
RUN_UTILS DeleteFile E:\fillfile2.txt
|
sl@0
|
164 |
RUN_UTILS DeleteFile T:\fillfile4M.txt
|
sl@0
|
165 |
RUN_UTILS DeleteFile E:\fillfile4M.txt
|
sl@0
|
166 |
RUN_UTILS DeleteFile T:\fillDisk*.txt
|
sl@0
|
167 |
RUN_UTILS DeleteFile E:\fillDisk*.txt
|