THRIFT-5387 Improved and simplified Delphi test setup
Client: Delphi
Patch: Jens Geyer
diff --git a/lib/delphi/test/skip/skiptest_version1.dpr b/lib/delphi/test/skip/skiptest_version1.dpr
index f7cde2f..6d877de 100644
--- a/lib/delphi/test/skip/skiptest_version1.dpr
+++ b/lib/delphi/test/skip/skiptest_version1.dpr
@@ -23,7 +23,7 @@
uses
Classes, Windows, SysUtils,
- Skiptest.One,
+ Skiptest.One in 'gen-delphi\Skiptest.One.pas',
Thrift in '..\..\src\Thrift.pas',
Thrift.Exception in '..\..\src\Thrift.Exception.pas',
Thrift.Socket in '..\..\src\Thrift.Socket.pas',
@@ -47,7 +47,7 @@
function CreatePing : IPing;
begin
result := TPingImpl.Create;
- result.Version1 := Tskiptest_version_1Constants.SKIPTESTSERVICE_VERSION;
+ result.Version1 := TConstants.SKIPTESTSERVICE_VERSION;
result.EnumTest := TPingPongEnum.PingOne;
end;
@@ -189,7 +189,7 @@
FILE_COMPACT = 'pingpong.compact';
begin
try
- Writeln( 'Delphi SkipTest '+IntToStr(Tskiptest_version_1Constants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
+ Writeln( 'Delphi SkipTest '+IntToStr(TConstants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
Writeln;
Writeln('Binary protocol');
diff --git a/lib/delphi/test/skip/skiptest_version1.dproj b/lib/delphi/test/skip/skiptest_version1.dproj
new file mode 100644
index 0000000..2e8997e
--- /dev/null
+++ b/lib/delphi/test/skip/skiptest_version1.dproj
@@ -0,0 +1,144 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{894CD87B-337B-49F7-BC7D-2D9F65CE8FE0}</ProjectGuid>
+ <MainSource>skiptest_version1.dpr</MainSource>
+ <Basis>True</Basis>
+ <Config Condition="'$(Config)'==''">Debug</Config>
+ <Platform>Win32</Platform>
+ <AppType>Console</AppType>
+ <FrameworkType>None</FrameworkType>
+ <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+ <ProjectVersion>12.3</ProjectVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
+ <Cfg_1>true</Cfg_1>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
+ <Cfg_2>true</Cfg_2>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base)'!=''">
+ <DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+ <DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+ <DCC_E>false</DCC_E>
+ <DCC_ImageBase>00400000</DCC_ImageBase>
+ <DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+ <DCC_F>false</DCC_F>
+ <DCC_S>false</DCC_S>
+ <DCC_N>false</DCC_N>
+ <DCC_K>false</DCC_K>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
+ <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+ <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+ <DCC_DebugInformation>false</DCC_DebugInformation>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+ <DCC_Optimize>false</DCC_Optimize>
+ <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+ </PropertyGroup>
+ <ItemGroup>
+ <DelphiCompile Include="skiptest_version1.dpr">
+ <MainSource>MainSource</MainSource>
+ </DelphiCompile>
+ <DCCReference Include="gen-delphi\Skiptest.One.pas"/>
+ <DCCReference Include="..\..\src\Thrift.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Protocol.JSON.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Protocol.Compact.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Server.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+ <DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+ <DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+ <BuildConfiguration Include="Debug">
+ <Key>Cfg_2</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Basis">
+ <Key>Base</Key>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Release">
+ <Key>Cfg_1</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ </ItemGroup>
+ <Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
+ <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+ <PropertyGroup>
+ <PreBuildEvent><![CDATA[thrift.exe -r -gen delphi idl\skiptest_version_1.thrift]]></PreBuildEvent>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <Borland.Personality>Delphi.Personality.12</Borland.Personality>
+ <Borland.ProjectType>VCLApplication</Borland.ProjectType>
+ <BorlandProject>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">skiptest_version1.dpr</Source>
+ </Source>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">False</VersionInfo>
+ <VersionInfo Name="MajorVer">1</VersionInfo>
+ <VersionInfo Name="MinorVer">0</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">0</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">1031</VersionInfo>
+ <VersionInfo Name="CodePage">1252</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName"/>
+ <VersionInfoKeys Name="FileDescription"/>
+ <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName"/>
+ <VersionInfoKeys Name="LegalCopyright"/>
+ <VersionInfoKeys Name="LegalTrademarks"/>
+ <VersionInfoKeys Name="OriginalFilename"/>
+ <VersionInfoKeys Name="ProductName"/>
+ <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="Comments"/>
+ </VersionInfoKeys>
+ </Delphi.Personality>
+ <Platforms>
+ <Platform value="Win32">True</Platform>
+ </Platforms>
+ </BorlandProject>
+ <ProjectFileVersion>12</ProjectFileVersion>
+ </ProjectExtensions>
+ </Project>
diff --git a/lib/delphi/test/skip/skiptest_version2.dpr b/lib/delphi/test/skip/skiptest_version2.dpr
index 478ea7c..b3a270d 100644
--- a/lib/delphi/test/skip/skiptest_version2.dpr
+++ b/lib/delphi/test/skip/skiptest_version2.dpr
@@ -23,7 +23,7 @@
uses
Classes, Windows, SysUtils,
- Skiptest.Two,
+ Skiptest.Two in 'gen-delphi\Skiptest.Two.pas',
Thrift in '..\..\src\Thrift.pas',
Thrift.Exception in '..\..\src\Thrift.Exception.pas',
Thrift.Socket in '..\..\src\Thrift.Socket.pas',
@@ -49,7 +49,7 @@
set_ : IHashSet<string>;
begin
result := TPingImpl.Create;
- result.Version1 := Tskiptest_version_2Constants.SKIPTESTSERVICE_VERSION;
+ result.Version1 := TConstants.SKIPTESTSERVICE_VERSION;
result.EnumTest := TPingPongEnum.PingTwo;
result.BoolVal := TRUE;
@@ -219,7 +219,7 @@
FILE_COMPACT = 'pingpong.compact';
begin
try
- Writeln( 'Delphi SkipTest '+IntToStr(Tskiptest_version_2Constants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
+ Writeln( 'Delphi SkipTest '+IntToStr(TConstants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
Writeln;
Writeln('Binary protocol');
diff --git a/lib/delphi/test/skip/skiptest_version2.dproj b/lib/delphi/test/skip/skiptest_version2.dproj
new file mode 100644
index 0000000..3192d28
--- /dev/null
+++ b/lib/delphi/test/skip/skiptest_version2.dproj
@@ -0,0 +1,144 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{DBB2D6D8-0FC6-4329-8408-28B1452B33AD}</ProjectGuid>
+ <MainSource>skiptest_version2.dpr</MainSource>
+ <Basis>True</Basis>
+ <Config Condition="'$(Config)'==''">Debug</Config>
+ <Platform>Win32</Platform>
+ <AppType>Console</AppType>
+ <FrameworkType>None</FrameworkType>
+ <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+ <ProjectVersion>12.3</ProjectVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
+ <Cfg_1>true</Cfg_1>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
+ <Cfg_2>true</Cfg_2>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base)'!=''">
+ <DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+ <DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+ <DCC_E>false</DCC_E>
+ <DCC_ImageBase>00400000</DCC_ImageBase>
+ <DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+ <DCC_F>false</DCC_F>
+ <DCC_S>false</DCC_S>
+ <DCC_N>false</DCC_N>
+ <DCC_K>false</DCC_K>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1)'!=''">
+ <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
+ <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
+ <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
+ <DCC_DebugInformation>false</DCC_DebugInformation>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2)'!=''">
+ <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+ <DCC_Optimize>false</DCC_Optimize>
+ <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+ </PropertyGroup>
+ <ItemGroup>
+ <DelphiCompile Include="skiptest_version2.dpr">
+ <MainSource>MainSource</MainSource>
+ </DelphiCompile>
+ <DCCReference Include="gen-delphi\Skiptest.Two.pas"/>
+ <DCCReference Include="..\..\src\Thrift.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Protocol.JSON.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Protocol.Compact.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Server.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+ <DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+ <DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+ <DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+ <BuildConfiguration Include="Debug">
+ <Key>Cfg_2</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Basis">
+ <Key>Base</Key>
+ </BuildConfiguration>
+ <BuildConfiguration Include="Release">
+ <Key>Cfg_1</Key>
+ <CfgParent>Base</CfgParent>
+ </BuildConfiguration>
+ </ItemGroup>
+ <Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
+ <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+ <PropertyGroup>
+ <PreBuildEvent><![CDATA[thrift.exe -r -gen delphi idl\skiptest_version_2.thrift]]></PreBuildEvent>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <Borland.Personality>Delphi.Personality.12</Borland.Personality>
+ <Borland.ProjectType>VCLApplication</Borland.ProjectType>
+ <BorlandProject>
+ <Delphi.Personality>
+ <Source>
+ <Source Name="MainSource">skiptest_version2.dpr</Source>
+ </Source>
+ <VersionInfo>
+ <VersionInfo Name="IncludeVerInfo">False</VersionInfo>
+ <VersionInfo Name="AutoIncBuild">False</VersionInfo>
+ <VersionInfo Name="MajorVer">1</VersionInfo>
+ <VersionInfo Name="MinorVer">0</VersionInfo>
+ <VersionInfo Name="Release">0</VersionInfo>
+ <VersionInfo Name="Build">0</VersionInfo>
+ <VersionInfo Name="Debug">False</VersionInfo>
+ <VersionInfo Name="PreRelease">False</VersionInfo>
+ <VersionInfo Name="Special">False</VersionInfo>
+ <VersionInfo Name="Private">False</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
+ <VersionInfo Name="Locale">1031</VersionInfo>
+ <VersionInfo Name="CodePage">1252</VersionInfo>
+ </VersionInfo>
+ <VersionInfoKeys>
+ <VersionInfoKeys Name="CompanyName"/>
+ <VersionInfoKeys Name="FileDescription"/>
+ <VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="InternalName"/>
+ <VersionInfoKeys Name="LegalCopyright"/>
+ <VersionInfoKeys Name="LegalTrademarks"/>
+ <VersionInfoKeys Name="OriginalFilename"/>
+ <VersionInfoKeys Name="ProductName"/>
+ <VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
+ <VersionInfoKeys Name="Comments"/>
+ </VersionInfoKeys>
+ </Delphi.Personality>
+ <Platforms>
+ <Platform value="Win32">True</Platform>
+ </Platforms>
+ </BorlandProject>
+ <ProjectFileVersion>12</ProjectFileVersion>
+ </ProjectExtensions>
+ </Project>