blob: db62995559e3ceaf74ec3b5746583d6b08a893d1 [file] [log] [blame]
Jake Farrell29defeb2011-11-10 21:11:46 +00001(*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 *)
19
20
21program client;
22
23{$APPTYPE CONSOLE}
24
25uses
Jake Farrell27274222011-11-10 20:32:44 +000026 SysUtils,
Jens Geyer82fc93e2024-05-24 23:36:07 +020027 ConsoleHelper in 'ConsoleHelper.pas',
28 TestConstants in 'testsuite\TestConstants.pas',
29 TestClient in 'testsuite\client\TestClient.pas',
30 TestLogger in 'testsuite\client\TestLogger.pas',
31 UnitTests in 'testsuite\client\UnitTests.pas',
32 PerfTests in 'testsuite\client\Performance\PerfTests.pas',
33 DataFactory in 'testsuite\client\Performance\DataFactory.pas',
Jens Geyer66f95362021-03-29 20:35:41 +020034 Thrift.Test in 'gen-delphi\Thrift.Test.pas',
Roger Meier3bef8c22012-10-06 06:58:00 +000035 Thrift in '..\src\Thrift.pas',
36 Thrift.Transport in '..\src\Thrift.Transport.pas',
Jens Geyerbea9bbe2016-04-20 00:02:40 +020037 Thrift.Socket in '..\src\Thrift.Socket.pas',
Jens Geyera019cda2019-11-09 23:24:52 +010038 Thrift.Configuration in '..\src\Thrift.Configuration.pas',
Jens Geyer606f1ef2018-04-09 23:09:41 +020039 Thrift.Exception in '..\src\Thrift.Exception.pas',
Roger Meier3bef8c22012-10-06 06:58:00 +000040 Thrift.Transport.Pipes in '..\src\Thrift.Transport.Pipes.pas',
Jens Geyer02230912019-04-03 01:12:51 +020041 Thrift.Transport.WinHTTP in '..\src\Thrift.Transport.WinHTTP.pas',
42 Thrift.Transport.MsxmlHTTP in '..\src\Thrift.Transport.MsxmlHTTP.pas',
Roger Meier3bef8c22012-10-06 06:58:00 +000043 Thrift.Protocol in '..\src\Thrift.Protocol.pas',
44 Thrift.Protocol.JSON in '..\src\Thrift.Protocol.JSON.pas',
Jens Geyerf0e63312015-03-01 18:47:49 +010045 Thrift.Protocol.Compact in '..\src\Thrift.Protocol.Compact.pas',
Jens Geyere0e32402016-04-20 21:50:48 +020046 Thrift.Protocol.Multiplex in '..\src\Thrift.Protocol.Multiplex.pas',
Roger Meier3bef8c22012-10-06 06:58:00 +000047 Thrift.Collections in '..\src\Thrift.Collections.pas',
48 Thrift.Server in '..\src\Thrift.Server.pas',
49 Thrift.Stream in '..\src\Thrift.Stream.pas',
Jens Geyer6bbbf192014-09-07 01:45:56 +020050 Thrift.TypeRegistry in '..\src\Thrift.TypeRegistry.pas',
Jens Geyer02230912019-04-03 01:12:51 +020051 Thrift.WinHTTP in '..\src\Thrift.WinHTTP.pas',
Roger Meier3bef8c22012-10-06 06:58:00 +000052 Thrift.Utils in '..\src\Thrift.Utils.pas';
Jake Farrell27274222011-11-10 20:32:44 +000053
Jake Farrell29defeb2011-11-10 21:11:46 +000054var
55 nParamCount : Integer;
56 args : array of string;
57 i : Integer;
58 arg : string;
Jake Farrell29defeb2011-11-10 21:11:46 +000059
60begin
61 try
62 Writeln( 'Delphi TestClient '+Thrift.Version);
63 nParamCount := ParamCount;
64 SetLength( args, nParamCount);
Jens Geyer9f7f11e2016-04-14 21:37:11 +020065 for i := 1 to nParamCount do begin
Jake Farrell29defeb2011-11-10 21:11:46 +000066 arg := ParamStr( i );
67 args[i-1] := arg;
68 end;
Jens Geyer9f7f11e2016-04-14 21:37:11 +020069
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020070 ExitCode := TTestClient.Execute( args);
Jens Geyer9f7f11e2016-04-14 21:37:11 +020071
Jake Farrell29defeb2011-11-10 21:11:46 +000072 except
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020073 on E: EAbort do begin
74 ExitCode := $FF;
75 end;
Roger Meierbb6de7a2012-05-04 23:35:45 +000076 on E: Exception do begin
Jake Farrell29defeb2011-11-10 21:11:46 +000077 Writeln(E.ClassName, ': ', E.Message);
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020078 ExitCode := $FF;
Roger Meierbb6de7a2012-05-04 23:35:45 +000079 end;
Jake Farrell29defeb2011-11-10 21:11:46 +000080 end;
81end.
82