[patch_done] Some test patches
Posted: 23.05.2009, 14:54
In order to execute tests with firebird 2.1, please change
..\test\bugreport\ZTestCompInterbase.pas
function ZTestCompInterbaseBugReport.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\bugreport\ZTestDbcInterbase.pas
function TZTestDbcInterbaseBugReport.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\component\ZStoredprocedure.pas
function TZTestInterbaseStoredProcedure.GetSupportedProtocols: string;
begin
Result := 'interbase,interbase-6.5,interbase-7.2,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\dbc\ZTestdbcInterbase.pas
function TZTestDbcInterbaseCase.GetSupportedProtocols: string;
begin
Result := 'interbase,interbase-6.5,interbase-7.2,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\dbc\ZTestdbcInterbaseMetadata.pas
function TZInterbaseTestDbcMetadata.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\performance\ZTestPlainPerformance.pas
function TZPlainInterbase6SQLPerformanceTestCase.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\performance\ZTestIBXPerformance.pas
function TZIBXPerformanceTestCase.IsProtocolValid(Value: string): boolean;
begin
if (Value = 'interbase-5') or (Value = 'interbase-6') or
(Value = 'firebird-1.0') or (Value = 'firebird-1.5') or
(Value = 'firebird-2.0') or (Value = 'firebird-2.1') or
(Value = 'firebirdd-1.5') or (Value = 'firebirdd-2.0') or
(Value = 'firebirdd-2.1') then
Result := True
else
Result := False;
end;
..\test\performance\ZTestDBXPerformance.pas
function TZDBXPerformanceTestCase.GetSupportedProtocols: string;
begin
Result := 'mysql,mysql-3.20,mysql-3.23,mysql-4.0'
+ ',sybase,interbase,interbase-5,interbase-6'
+ ',firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1'
+ ',postgresql,postgresql-7,postgresql-8';
{$IFNDEF LINUX}
Result := Result + ',mssql';
{$ENDIF}
end;
..\packages\ZTestPerformance.dpr
program ZTestPerformance;
{$IFNDEF TESTGUI}
{$APPTYPE CONSOLE}
{$ENDIF}
{$I ..\..\test\performance\ZPerformance.inc}
uses
TestFramework,
{$IFDEF TESTGUI}
GUITestRunner,
{$ELSE}
TextTestRunner,
{$ENDIF}
ZTestConfig,
ZSqlTestCase,
ZPerformanceTestCase,
ZTestBdePerformance in '..\..\test\performance\ZTestBdePerformance.pas',
ZTestPlainPerformance in '..\..\test\performance\ZTestPlainPerformance.pas',
ZTestDbcPerformance in '..\..\test\performance\ZTestDbcPerformance.pas',
ZTestDatasetPerformance in '..\..\test\performance\ZTestDatasetPerformance.pas',
ZTestOldZeosPerformance in '..\..\test\performance\ZTestOldZeosPerformance.pas',
ZTestDbxPerformance in '..\..\test\performance\ZTestDbxPerformance.pas',
ZTestIBXPerformance in '..\..\test\performance\ZTestIbxPerformance.pas';
begin
TestGroup := PERFORMANCE_TEST_GROUP;
RebuildTestDatabases;
{$IFDEF TESTGUI}
GUITestRunner.RunRegisteredTests;
{$ELSE}
TextTestRunner.RunRegisteredTests;
{$ENDIF}
PerformanceResultProcessor.ProcessResults;
PerformanceResultProcessor.PrintResults;
end.
..\test\performance\ZTestPlainPerformance.pas
uses TestFramework, SysUtils, Classes, ZPerformanceTestCase,
{$IFDEF ENABLE_DBLIB}
{$ENDIF}
{$IFDEF ENABLE_INTERBASE}
ZPlainInterbaseDriver, <---- remove
ZDbcInterbase6Utils,
ZPlainFirebirdDriver,
ZPlainFirebirdInterbaseConstants,
{$ENDIF}
{$IFDEF ENABLE_MYSQL}
ZPlainMySqlDriver,
ZPlainMysqlConstants, <---- add
{$ENDIF}
{$ENDIF}
implementation
uses ZSqlTestCase, ZPlainMysqlConstants <--- remove ;
{$IFDEF ENABLE_MYSQL}
procedure TZPlainInterbase6SQLPerformanceTestCase.SetUp;
var
FFirebird10PlainDriver: IZInterbasePlainDriver;
FFirebird15PlainDriver: IZInterbasePlainDriver;
FFirebird20PlainDriver: IZInterbasePlainDriver;
FFirebird21PlainDriver: IZInterbasePlainDriver;
FFirebirdd15PlainDriver: IZInterbasePlainDriver;
FFirebirdd20PlainDriver: IZInterbasePlainDriver;
FFirebirdd21PlainDriver: IZInterbasePlainDriver;
// FInterbse5PlainDriver: IZInterbasePlainDriver; <--- remove
// FInterbse6PlainDriver: IZInterbasePlainDriver; <--- remove
begin
if Protocol = 'interbase-5' then
FDialect := 1
else FDialect := 3;
FFirebird10PlainDriver := TZFirebird10PlainDriver.Create;
FFirebird15PlainDriver := TZFirebird15PlainDriver.Create;
FFirebird20PlainDriver := TZFirebird20PlainDriver.Create;
FFirebird21PlainDriver := TZFirebird21PlainDriver.Create;
FFirebirdd15PlainDriver := TZFirebird15PlainDriver.Create;
FFirebirdd20PlainDriver := TZFirebirdd20PlainDriver.Create;
FFirebirdd21PlainDriver := TZFirebirdd21PlainDriver.Create;
// FInterbse5PlainDriver := TZInterbase5PlainDriver.Create; <--- remove
// FInterbse6PlainDriver := TZInterbase6PlainDriver.Create; <--- remove
if Protocol = FFirebird10PlainDriver.GetProtocol then
PlainDriver := FFirebird10PlainDriver
else if Protocol = FFirebird15PlainDriver.GetProtocol then
PlainDriver := FFirebird15PlainDriver
else if Protocol = FFirebird20PlainDriver.GetProtocol then
PlainDriver := FFirebird20PlainDriver
else if Protocol = FFirebird21PlainDriver.GetProtocol then
PlainDriver := FFirebird21PlainDriver
else if Protocol = FFirebirdd15PlainDriver.GetProtocol then
PlainDriver := FFirebirdd15PlainDriver
else if Protocol = FFirebirdd21PlainDriver.GetProtocol then
PlainDriver := FFirebird21PlainDriver
// else if Protocol = FInterbse5PlainDriver.GetProtocol then <--- remove
// PlainDriver := FInterbse5PlainDriver <--- remove
// else if Protocol = FInterbse6PlainDriver.GetProtocol then <--- remove
// PlainDriver := FInterbse6PlainDriver <--- remove
else PlainDriver := FFirebird10PlainDriver;
PlainDriver.Initialize;
end;
..\test\bugreport\ZTestCompInterbase.pas
function ZTestCompInterbaseBugReport.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\bugreport\ZTestDbcInterbase.pas
function TZTestDbcInterbaseBugReport.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\component\ZStoredprocedure.pas
function TZTestInterbaseStoredProcedure.GetSupportedProtocols: string;
begin
Result := 'interbase,interbase-6.5,interbase-7.2,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\dbc\ZTestdbcInterbase.pas
function TZTestDbcInterbaseCase.GetSupportedProtocols: string;
begin
Result := 'interbase,interbase-6.5,interbase-7.2,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\dbc\ZTestdbcInterbaseMetadata.pas
function TZInterbaseTestDbcMetadata.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\performance\ZTestPlainPerformance.pas
function TZPlainInterbase6SQLPerformanceTestCase.GetSupportedProtocols: string;
begin
Result := 'interbase-5,interbase-6,firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1';
end;
..\test\performance\ZTestIBXPerformance.pas
function TZIBXPerformanceTestCase.IsProtocolValid(Value: string): boolean;
begin
if (Value = 'interbase-5') or (Value = 'interbase-6') or
(Value = 'firebird-1.0') or (Value = 'firebird-1.5') or
(Value = 'firebird-2.0') or (Value = 'firebird-2.1') or
(Value = 'firebirdd-1.5') or (Value = 'firebirdd-2.0') or
(Value = 'firebirdd-2.1') then
Result := True
else
Result := False;
end;
..\test\performance\ZTestDBXPerformance.pas
function TZDBXPerformanceTestCase.GetSupportedProtocols: string;
begin
Result := 'mysql,mysql-3.20,mysql-3.23,mysql-4.0'
+ ',sybase,interbase,interbase-5,interbase-6'
+ ',firebird-1.0,firebird-1.5,firebird-2.0,firebird-2.1,firebirdd-1.5,firebirdd-2.0,firebirdd-2.1'
+ ',postgresql,postgresql-7,postgresql-8';
{$IFNDEF LINUX}
Result := Result + ',mssql';
{$ENDIF}
end;
..\packages\ZTestPerformance.dpr
program ZTestPerformance;
{$IFNDEF TESTGUI}
{$APPTYPE CONSOLE}
{$ENDIF}
{$I ..\..\test\performance\ZPerformance.inc}
uses
TestFramework,
{$IFDEF TESTGUI}
GUITestRunner,
{$ELSE}
TextTestRunner,
{$ENDIF}
ZTestConfig,
ZSqlTestCase,
ZPerformanceTestCase,
ZTestBdePerformance in '..\..\test\performance\ZTestBdePerformance.pas',
ZTestPlainPerformance in '..\..\test\performance\ZTestPlainPerformance.pas',
ZTestDbcPerformance in '..\..\test\performance\ZTestDbcPerformance.pas',
ZTestDatasetPerformance in '..\..\test\performance\ZTestDatasetPerformance.pas',
ZTestOldZeosPerformance in '..\..\test\performance\ZTestOldZeosPerformance.pas',
ZTestDbxPerformance in '..\..\test\performance\ZTestDbxPerformance.pas',
ZTestIBXPerformance in '..\..\test\performance\ZTestIbxPerformance.pas';
begin
TestGroup := PERFORMANCE_TEST_GROUP;
RebuildTestDatabases;
{$IFDEF TESTGUI}
GUITestRunner.RunRegisteredTests;
{$ELSE}
TextTestRunner.RunRegisteredTests;
{$ENDIF}
PerformanceResultProcessor.ProcessResults;
PerformanceResultProcessor.PrintResults;
end.
..\test\performance\ZTestPlainPerformance.pas
uses TestFramework, SysUtils, Classes, ZPerformanceTestCase,
{$IFDEF ENABLE_DBLIB}
{$ENDIF}
{$IFDEF ENABLE_INTERBASE}
ZPlainInterbaseDriver, <---- remove
ZDbcInterbase6Utils,
ZPlainFirebirdDriver,
ZPlainFirebirdInterbaseConstants,
{$ENDIF}
{$IFDEF ENABLE_MYSQL}
ZPlainMySqlDriver,
ZPlainMysqlConstants, <---- add
{$ENDIF}
{$ENDIF}
implementation
uses ZSqlTestCase, ZPlainMysqlConstants <--- remove ;
{$IFDEF ENABLE_MYSQL}
procedure TZPlainInterbase6SQLPerformanceTestCase.SetUp;
var
FFirebird10PlainDriver: IZInterbasePlainDriver;
FFirebird15PlainDriver: IZInterbasePlainDriver;
FFirebird20PlainDriver: IZInterbasePlainDriver;
FFirebird21PlainDriver: IZInterbasePlainDriver;
FFirebirdd15PlainDriver: IZInterbasePlainDriver;
FFirebirdd20PlainDriver: IZInterbasePlainDriver;
FFirebirdd21PlainDriver: IZInterbasePlainDriver;
// FInterbse5PlainDriver: IZInterbasePlainDriver; <--- remove
// FInterbse6PlainDriver: IZInterbasePlainDriver; <--- remove
begin
if Protocol = 'interbase-5' then
FDialect := 1
else FDialect := 3;
FFirebird10PlainDriver := TZFirebird10PlainDriver.Create;
FFirebird15PlainDriver := TZFirebird15PlainDriver.Create;
FFirebird20PlainDriver := TZFirebird20PlainDriver.Create;
FFirebird21PlainDriver := TZFirebird21PlainDriver.Create;
FFirebirdd15PlainDriver := TZFirebird15PlainDriver.Create;
FFirebirdd20PlainDriver := TZFirebirdd20PlainDriver.Create;
FFirebirdd21PlainDriver := TZFirebirdd21PlainDriver.Create;
// FInterbse5PlainDriver := TZInterbase5PlainDriver.Create; <--- remove
// FInterbse6PlainDriver := TZInterbase6PlainDriver.Create; <--- remove
if Protocol = FFirebird10PlainDriver.GetProtocol then
PlainDriver := FFirebird10PlainDriver
else if Protocol = FFirebird15PlainDriver.GetProtocol then
PlainDriver := FFirebird15PlainDriver
else if Protocol = FFirebird20PlainDriver.GetProtocol then
PlainDriver := FFirebird20PlainDriver
else if Protocol = FFirebird21PlainDriver.GetProtocol then
PlainDriver := FFirebird21PlainDriver
else if Protocol = FFirebirdd15PlainDriver.GetProtocol then
PlainDriver := FFirebirdd15PlainDriver
else if Protocol = FFirebirdd21PlainDriver.GetProtocol then
PlainDriver := FFirebird21PlainDriver
// else if Protocol = FInterbse5PlainDriver.GetProtocol then <--- remove
// PlainDriver := FInterbse5PlainDriver <--- remove
// else if Protocol = FInterbse6PlainDriver.GetProtocol then <--- remove
// PlainDriver := FInterbse6PlainDriver <--- remove
else PlainDriver := FFirebird10PlainDriver;
PlainDriver.Initialize;
end;