| 881 | } |
| 882 | |
| 883 | static DWORD LocalStorage_Test(PFN_RUN_TEST PfnRunTest, STORAGE_INFO & StorInfo) |
| 884 | { |
| 885 | TLogHelper LogHelper(StorInfo.szPath); |
| 886 | HANDLE hStorage; |
| 887 | TCHAR szFullPath[MAX_PATH]; |
| 888 | DWORD dwErrCode = ERROR_SUCCESS; |
| 889 | |
| 890 | // Prepare the full path of the storage |
| 891 | MakeFullPath(szFullPath, _countof(szFullPath), StorInfo.szPath); |
| 892 | |
| 893 | // Open the CASC storage |
| 894 | LogHelper.PrintProgress("Opening storage ..."); |
| 895 | if(CascOpenStorage(szFullPath, 0, &hStorage)) |
| 896 | { |
| 897 | TEST_PARAMS Params; |
| 898 | |
| 899 | // Configure the test parameters |
| 900 | Params.hStorage = hStorage; |
| 901 | Params.szExpectedNameHash = StorInfo.szNameHash; |
| 902 | Params.szExpectedDataHash = StorInfo.szDataHash; |
| 903 | Params.szFileName = StorInfo.szFileName; |
| 904 | dwErrCode = PfnRunTest(LogHelper, Params); |
| 905 | } |
| 906 | else |
| 907 | { |
| 908 | LogHelper.PrintError("Error: Failed to open storage %s", StorInfo.szPath); |
| 909 | assert(GetCascError() != ERROR_SUCCESS); |
| 910 | dwErrCode = GetCascError(); |
| 911 | } |
| 912 | |
| 913 | return dwErrCode; |
| 914 | } |
| 915 | |
| 916 | static DWORD SpeedStorage_Test(PFN_RUN_TEST PfnRunTest, LPCSTR szStorage, LPCSTR szExpectedNameHash = NULL, LPCSTR szExpectedDataHash = NULL, LPCSTR szFileName = NULL) |
| 917 | { |
no test coverage detected