installationservices/swi/test/tsisregistrytest_legacy/Scripts/tsisregistrytest.script
changeset 0 ba25891c3a9e
child 5 3eebb1e54d3a
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 //
       
     2 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 // All rights reserved.
       
     4 // This component and the accompanying materials are made available
       
     5 // under the terms of the License "Eclipse Public License v1.0"
       
     6 // which accompanies this distribution, and is available
       
     7 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 //
       
     9 // Initial Contributors:
       
    10 // Nokia Corporation - initial contribution.
       
    11 //
       
    12 // Contributors:
       
    13 //
       
    14 // Description:
       
    15 //
       
    16 //
       
    17 PRINT Run all SisRegistry tests
       
    18 //
       
    19 LOAD_SUITE tSisRegistryTest
       
    20 LOAD_SUITE tuiscriptadaptors
       
    21 //
       
    22 #
       
    23 
       
    24 // after startup wait for registry to shutdown so it can restart and reinitialize with the test registry files
       
    25 DELAY 5000
       
    26 
       
    27 RUN_TEST_STEP 100 tSisRegistryTest BackupRegistry
       
    28 
       
    29 // Time how long it takes to regenerate the cache 
       
    30 RUN_TEST_STEP 100 tSisRegistryTest RomStubPerformanceCheck
       
    31 
       
    32 // wait for the registry to shutdown
       
    33 DELAY 5000
       
    34 RUN_TEST_STEP 100 tSisRegistryTest DeleteRegistry
       
    35 RUN_TEST_STEP 100 tSisRegistryTest RestoreRegistry
       
    36 
       
    37 //! @file
       
    38 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0001
       
    39 //! @SYMTestCaseDesc		Prepares the test by backing up the existing SisRegistry and copying test files
       
    40 //! @SYMTestPriority		Low
       
    41 //! @SYMTestActions		Prepares the test by backing up the existing SisRegistry and copying test files
       
    42 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
    43 //! @SYMREQ			REQ3464
       
    44 //! @SYMTestType		UT
       
    45 
       
    46 START_TESTCASE API-SEC-SISREGISTRY-B-0001
       
    47 
       
    48 RUN_TEST_STEP 100 tSisRegistryTest BackupRegistry
       
    49 RUN_TEST_STEP 100 tSisRegistryTest CreateTestRegistry
       
    50 
       
    51 END_TESTCASE API-SEC-SISREGISTRY-B-0001
       
    52 
       
    53 
       
    54 // we have constructed the registry by copying .reg files into position
       
    55 // we should know the exact contents of the registry
       
    56 
       
    57 //! @file
       
    58 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0002
       
    59 //! @SYMTestCaseDesc		Checks that the list of installed uids matchs the expected list of installed uids
       
    60 //! @SYMTestPriority		Low
       
    61 //! @SYMTestActions		Checks that the list of installed uids matchs the expected list of installed uids
       
    62 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
    63 //! @SYMREQ			REQ3464
       
    64 //! @SYMTestType		UT
       
    65 
       
    66 START_TESTCASE API-SEC-SISREGISTRY-B-0002
       
    67 
       
    68 RUN_TEST_STEP 100 tSisRegistryTest InstalledUids z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini InstalledUids
       
    69 
       
    70 END_TESTCASE API-SEC-SISREGISTRY-B-0002
       
    71 
       
    72 
       
    73 //! @file
       
    74 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0003
       
    75 //! @SYMTestCaseDesc		Checks that the list of installed packages matchs the expected list of installed packages
       
    76 //! @SYMTestPriority		Low
       
    77 //! @SYMTestActions		Checks that the list of installed packages matchs the expected list of installed packages
       
    78 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
    79 //! @SYMREQ			REQ3464
       
    80 //! @SYMTestType		UT
       
    81 
       
    82 START_TESTCASE API-SEC-SISREGISTRY-B-0003
       
    83 
       
    84 RUN_TEST_STEP 100 tSisRegistryTest InstalledPackages z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini InstalledPackages
       
    85 
       
    86 END_TESTCASE API-SEC-SISREGISTRY-B-0003
       
    87 
       
    88 
       
    89 // now check things are *not* reported as installed.
       
    90 RUN_SCRIPT z:\tswi\tsisregistrytest\scripts\notinstalled.script
       
    91 
       
    92 
       
    93 //! @file
       
    94 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0004
       
    95 //! @SYMTestCaseDesc		Checks that the correct filename for a sid 
       
    96 //! @SYMTestPriority		Low
       
    97 //! @SYMTestActions		Requests a filename for a sid and should be that of expected
       
    98 //! @SYMTestExpectedResults	The test completes with KErrNone completion code
       
    99 //! @SYMDEF 			DEF052672
       
   100 //! @SYMTestType		UT
       
   101 
       
   102 START_TESTCASE API-SEC-SISREGISTRY-B-0004
       
   103 
       
   104 RUN_TEST_STEP 100 tSisRegistryTest SidToFileName z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini SidAndFilenames
       
   105 
       
   106 END_TESTCASE API-SEC-SISREGISTRY-B-0004
       
   107 
       
   108  
       
   109 //! @file
       
   110 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0005
       
   111 //! @SYMTestCaseDesc		Gets the hash of 2 files, each from a package. 
       
   112 //! @SYMTestPriority		Medium
       
   113 //! @SYMTestActions		Requests the hash for each of 2 filenames and checks that it is the correct one.
       
   114 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   115 //! @SYMDEF 			DEF054596
       
   116 //! @SYMTestType		UT
       
   117 
       
   118 START_TESTCASE API-SEC-SISREGISTRY-B-0005
       
   119 
       
   120 RUN_TEST_STEP 100 tSisRegistryTest FileHash z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini HashAndFile
       
   121 
       
   122 END_TESTCASE API-SEC-SISREGISTRY-B-0005
       
   123 
       
   124 
       
   125 //! @file
       
   126 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0006
       
   127 //! @SYMTestCaseDesc		Checks that the installed controllers match the list of expected controllers
       
   128 //! @SYMTestPriority		Low
       
   129 //! @SYMTestActions		Checks that each controller in the expected list of controllers is installed
       
   130 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   131 //! @SYMREQ			REQ3464
       
   132 //! @SYMTestType		UT
       
   133 
       
   134 START_TESTCASE API-SEC-SISREGISTRY-B-0006
       
   135 
       
   136 RUN_TEST_STEP 100 tSisRegistryTest GetControllers z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini GetControllers
       
   137 
       
   138 END_TESTCASE API-SEC-SISREGISTRY-B-0006
       
   139 
       
   140 
       
   141 //! @file
       
   142 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0007
       
   143 //! @SYMTestCaseDesc		Checks that the installed controllers match the list of expected controllers
       
   144 //! @SYMTestPriority		Low
       
   145 //! @SYMTestActions		Checks that each controller in the expected list of controllers is installed
       
   146 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   147 //! @SYMREQ			REQ3464
       
   148 //! @SYMTestType		UT
       
   149 
       
   150 START_TESTCASE API-SEC-SISREGISTRY-B-0007
       
   151 
       
   152 RUN_TEST_STEP 100 tSisRegistryTest IsControllerInstalled z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini IsControllerInstalled
       
   153 
       
   154 END_TESTCASE API-SEC-SISREGISTRY-B-0007
       
   155 
       
   156 
       
   157 //! @file
       
   158 //! @SYMTestCaseID		API-SEC-SISREGISTRY-DEF080947-B-0001
       
   159 //! @SYMTestCaseDesc		DEF080947: New security API to determine whether a SID is installed
       
   160 //!	Test new RSisRegistrySession::IsSidPresentL API.
       
   161 
       
   162 START_TESTCASE API-SEC-SISREGISTRY-DEF080947-B-0001
       
   163 
       
   164 RUN_TEST_STEP 100 tSisRegistryTest IsSidPresent z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini IsControllerInstalled
       
   165 
       
   166 END_TESTCASE API-SEC-SISREGISTRY-DEF080947-B-0001
       
   167 
       
   168 
       
   169 //! @file
       
   170 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0008
       
   171 //! @SYMTestCaseDesc		Checks that specific writable interface operations are policed by Sid 
       
   172 //! @SYMTestPriority		Low
       
   173 //! @SYMTestActions		Call sequentially AddDrive/RemoveDrive and DeleteEntryL API methods to verify these fail
       
   174 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   175 //! @SYMREQ			REQ3464
       
   176 //! @SYMTestType		UT
       
   177 
       
   178 START_TESTCASE API-SEC-SISREGISTRY-B-0008
       
   179 
       
   180 RUN_TEST_STEP 100 tSisRegistryTest PoliceSids 
       
   181 
       
   182 END_TESTCASE API-SEC-SISREGISTRY-B-0008
       
   183 
       
   184 
       
   185 // now run the main registry tests
       
   186 RUN_SCRIPT z:\tswi\tsisregistrytest\scripts\runregistrytests.script
       
   187 
       
   188 // wait for the registry to shutdown
       
   189 DELAY 10000
       
   190 
       
   191 
       
   192 // we now recreate a similar registry (that may contain addition entries from in-rom sis files) by installing the sis files that were used originally to created the test registry. this proves that registry files are backwards compatible.
       
   193 
       
   194 //! @file
       
   195 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0009
       
   196 //! @SYMTestCaseDesc		Removes the Test Registry, then recreate it by installing SIS files
       
   197 //! @SYMTestPriority		Low
       
   198 //! @SYMTestActions		Removes the test registry
       
   199 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   200 //! @SYMREQ			REQ3464
       
   201 //! @SYMTestType		UT
       
   202 
       
   203 START_TESTCASE API-SEC-SISREGISTRY-B-0009
       
   204 
       
   205 RUN_TEST_STEP 100 tSisRegistryTest DeleteRegistry
       
   206 
       
   207 END_TESTCASE API-SEC-SISREGISTRY-B-0009
       
   208 
       
   209 
       
   210 RUN_SCRIPT z:\tswi\tsisregistrytest\scripts\generateregistrytestdata.script
       
   211 
       
   212 
       
   213 //! @file
       
   214 //! @SYMTestCaseID		API-SEC-SISREGISTRY-DEF123452-B-0001
       
   215 //! @SYMTestCaseDesc		Checks the number of embedding packages of a given package
       
   216 //! @SYMTestPriority		Medium
       
   217 //! @SYMTestActions		Checks the number of embedding packages of a given package
       
   218 //! @SYMTestExpectedResults	Actual number of embedding packages meets expected
       
   219 //! @SYMDEF			DEF123452
       
   220 //! @SYMTestType		UT
       
   221 
       
   222 START_TESTCASE API-SEC-SISREGISTRY-DEF123452-B-0001
       
   223 
       
   224 RUN_TEST_STEP 100 tSisRegistryTest EmbeddingPackageStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini EmbeddingPackages
       
   225 
       
   226 // Save a snapshot of the registry we just created
       
   227 RUN_TEST_STEP 100 tSisRegistryTest SaveGeneratedRegistry
       
   228 
       
   229 END_TESTCASE API-SEC-SISREGISTRY-DEF123452-B-0001
       
   230 
       
   231 
       
   232 //! @file
       
   233 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0010
       
   234 //! @SYMTestCaseDesc		Checks whether the file is tagged as modifiable. 
       
   235 //! @SYMTestPriority		Medium
       
   236 //! @SYMTestActions		Requests file modifiable status and checks that it is the correct one.
       
   237 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   238 //! @SYMDEF 			DEF054596
       
   239 //! @SYMTestType		UT
       
   240 
       
   241 START_TESTCASE API-SEC-SISREGISTRY-B-0010
       
   242 
       
   243 RUN_TEST_STEP 100 tSisRegistryTest ModifiableFile z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini ModifiableTagAndFile
       
   244 
       
   245 END_TESTCASE API-SEC-SISREGISTRY-B-0010
       
   246 
       
   247 
       
   248 // now check things are *not* reported as installed.
       
   249 RUN_SCRIPT z:\tswi\tsisregistrytest\scripts\notinstalled.script
       
   250 
       
   251 // now re-run the main registry tests
       
   252 RUN_SCRIPT z:\tswi\tsisregistrytest\scripts\runregistrytests.script
       
   253 
       
   254 
       
   255 //
       
   256 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0011
       
   257 //! @SYMTestCaseDesc		When a sisregistry entry is corrupt (missing .reg file in this case), 
       
   258 //	 	     		sisregistry should not panic when we try to regenerate it.
       
   259 //! @SYMDEF			PDEF109006
       
   260 //! @SYMTestPriority		Medium
       
   261 //! @SYMTestActions		Delete C32Exe (101f7989) .reg file; Install-Cancel a sis file.
       
   262 //! @SYMTestExpectedResults	No panic generated during cache regeneration
       
   263 //! @SYMDevelopedForRelease 	Mike
       
   264 
       
   265 START_TESTCASE API-SEC-SISREGISTRY-B-0011
       
   266 
       
   267 RUN_TEST_STEP 100 tuiscriptadaptors MmcDeleteFilesStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini NotRegistered
       
   268 RUN_TEST_STEP 100 tuiscriptadaptors InstallStepCancel z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini NotRegistered
       
   269 RUN_TEST_STEP 100 tuiscriptadaptors MmcCheckFilesStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini u_NotRegistered
       
   270 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini u_NotRegistered
       
   271 
       
   272 END_TESTCASE API-SEC-SISREGISTRY-B-0011
       
   273 
       
   274 
       
   275 //! @file
       
   276 //! @SYMTestCaseID		API-SEC-SISREGISTRY-B-0012
       
   277 //! @SYMTestCaseDesc		Removes the Test Registry, restores the original
       
   278 //! @SYMTestPriority		Low
       
   279 //! @SYMTestActions		Removes the test registry
       
   280 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   281 //! @SYMREQ			REQ3464
       
   282 //! @SYMTestType		UT
       
   283 
       
   284 // This TestCase consists of a number of other TestCases in the following file and therefore this does not have a START and END statement
       
   285 RUN_SCRIPT z:\tswi\tsisregistrytest\scripts\removeregistrytestdata.script
       
   286 
       
   287 
       
   288 //! @SYMTestCaseID		API-SEC-SWI-PDEF113727-B-0001
       
   289 //! @SYMTestCaseDesc		Checks that the SisRegistry can recover from a corrupted cache file
       
   290 //! @SYMTestPriority		Low
       
   291 //! @SYMTestActions		Connect to the SisRegistry using the corrupt backup.lst and recover from the panic
       
   292 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   293 //! @SYMDEF 			PDEF113727
       
   294 //! @SYMTestType		UT
       
   295 
       
   296 START_TESTCASE API-SEC-SWI-PDEF113727-B-0001
       
   297 
       
   298 // wait for previous step to restore the original one in Demand Paging ROM.
       
   299 DELAY 3000
       
   300 RUN_TEST_STEP 100 tSisRegistryTest CorruptCacheStep
       
   301 RUN_TEST_STEP 100 tSisRegistryTest CorruptCacheRecoverStep
       
   302 
       
   303 
       
   304 // wait for the registry to shutdown
       
   305 DELAY 10000
       
   306 RUN_TEST_STEP 100 tSisRegistryTest DeleteRegistry
       
   307 RUN_TEST_STEP 100 tSisRegistryTest RestoreRegistry
       
   308 
       
   309 //
       
   310 PRINT Run all SisRegistryLogFile tests
       
   311 //
       
   312 LOAD_SUITE tuiscriptadaptors
       
   313 //
       
   314 
       
   315 END_TESTCASE API-SEC-SWI-PDEF113727-B-0001
       
   316 
       
   317 
       
   318 //! @file
       
   319 //! @SYMTestCaseID		API-SEC-SWI-95817-B-0002
       
   320 //! @SYMTestCaseDesc		Install a sis file, check for logging file, uninstall the file 
       
   321 //! @SYMTestExpectedResults	Package should be loggeg in SWIS private directory
       
   322 
       
   323 START_TESTCASE API-SEC-SWI-95817-B-0002
       
   324 
       
   325 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  SEC-SWI-95817-Simple-In
       
   326 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  SEC-SWI-95817-Simple-In
       
   327 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  SEC-SWI-95817-Simple-In
       
   328 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  SEC-SWI-95817-Simple-Un
       
   329 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  SEC-SWI-95817-Simple-In
       
   330 RUN_TEST_STEP 100 tSisRegistryTest LoggingFileInfo z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini SEC-SWI-95817-Simple-Uids
       
   331 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  SEC-SWI-95817-Simple-Un
       
   332 
       
   333 END_TESTCASE API-SEC-SWI-95817-B-0002
       
   334 
       
   335 
       
   336 //! @SYMTestCaseID		API-SEC-SWI-DEF112195-B-0001
       
   337 //! @SYMTestCaseDesc		Checks that ROM stubs doesn't occur in Removable packages
       
   338 //! @SYMTestPriority		High
       
   339 //! @SYMTestActions		Checks that ROM stubs doesn't occur in Removable packages
       
   340 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   341 //! @SYMDEF 			DEF112195
       
   342 //! @SYMTestType		UT
       
   343 
       
   344 START_TESTCASE API-SEC-SWI-95817-B-0001
       
   345 
       
   346 RUN_TEST_STEP 100 tSisRegistryTest InRomNonRemovablePackages
       
   347 
       
   348 RUN_TEST_STEP 100 tuiscriptadaptors InstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  Installpkgdrives
       
   349 
       
   350 END_TESTCASE API-SEC-SWI-95817-B-0001
       
   351 
       
   352 
       
   353 //! @SYMTestCaseID		API-SEC-SWI-DEF112215-B-0001
       
   354 //! @SYMTestCaseDesc		Checks that all the drives are listed used for installation
       
   355 //! @SYMTestPriority		Low
       
   356 //! @SYMTestActions		Checks that all the drives are listed used for installation
       
   357 //! @SYMTestExpectedResults	The test completes with KErrNone completion code.
       
   358 //! @SYMDEF 			DEF112215
       
   359 //! @SYMTestType		UT
       
   360 
       
   361 START_TESTCASE API-SEC-SWI-DEF112215-B-0001
       
   362 
       
   363 RUN_TEST_STEP 100 tSisRegistryTest InstalledDrives z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini InstalledfilesDrivesuid
       
   364 
       
   365 RUN_TEST_STEP 100 tuiscriptadaptors UninstallStep z:\tswi\tsisregistrytest\scripts\tsisregistrytest.ini  u_Installpkgdrives
       
   366 
       
   367 END_TESTCASE API-SEC-SWI-DEF112215-B-0001