mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Rewrite ECPG regression test driver in C, by splitting the standard
regression driver into two parts and reusing half of it. Required to run ECPG tests without a shell on MSVC builds. Fix ECPG thread tests for MSVC build (incl output files). Joachim Wieland and Magnus Hagander
This commit is contained in:
46
src/tools/msvc/ecpg_regression.proj
Normal file
46
src/tools/msvc/ecpg_regression.proj
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="all">
|
||||
<!--
|
||||
MSBuild project file to build ecpg regression tests
|
||||
-->
|
||||
|
||||
<PropertyGroup>
|
||||
<TESTDIR>..\..\interfaces\ecpg\test</TESTDIR>
|
||||
<CONFIG>Debug</CONFIG>
|
||||
<OUTDIR>..\..\..\..\..\$(CONFIG)\</OUTDIR>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(CONFIG)'=='DEBUG'">
|
||||
<!-- set debug runtime library if necessary to be compatible with the LIB files generated -->
|
||||
<DEBUGLIB>d</DEBUGLIB>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Pgc Include="$(TESTDIR)\**\*.pgc" Exclude="$(TESTDIR)\performance\perftest.pgc"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<OutputToDelete Include="$(TESTDIR)\**\*.exe" />
|
||||
<OutputToDelete Include="$(TESTDIR)\**\*.exe.manifest" />
|
||||
<OutputToDelete Include="$(TESTDIR)\**\*.obj" />
|
||||
<OutputToDelete Include="$(TESTDIR)\**\*.c" Exclude="$(TESTDIR)\pg_regress_ecpg.c;$(TESTDIR)\expected\*.c" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="all" Inputs="@(Pgc)" Outputs="%(RelativeDir)%(Filename).exe">
|
||||
<!-- Set special parameters for some tests -->
|
||||
<CreateProperty Value="-C INFORMIX" Condition="'%(Pgc.RelativeDir)'=='$(TESTDIR)\compat_informix\'">
|
||||
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
||||
</CreateProperty>
|
||||
<CreateProperty Value="-C INFORMIX -r no_indicator" Condition="'%(Pgc.FileName)'=='rnull'">
|
||||
<Output TaskParameter="Value" PropertyName="ECPGPARAM" />
|
||||
</CreateProperty>
|
||||
|
||||
<!-- Run ECPG and the Visual C++ compiler on the files. Don't bother with dependency check between the steps -->
|
||||
<Exec WorkingDirectory="%(Pgc.RelativeDir)" Command="$(OUTDIR)ecpg\ecpg -I ../../include --regression $(ECPGPARAM) -o %(Pgc.Filename).c %(Pgc.Filename).pgc" />
|
||||
<Exec WorkingDirectorY="%(Pgc.RelativeDir)" Command="cl /nologo %(Pgc.FileName).c /TC /MD$(DEBUGLIB) /DENABLE_THREAD_SAFETY /DWIN32 /DWIN32_ONLY_COMPILER /I. /I..\..\include /I..\..\..\libpq /I..\..\..\..\include /link /defaultlib:$(OUTDIR)libecpg\libecpg.lib /defaultlib:$(OUTDIR)libecpg_compat\libecpg_compat.lib /defaultlib:$(OUTDIR)libpgtypes\libpgtypes.lib" />
|
||||
</Target>
|
||||
|
||||
<!-- Clean up all output files -->
|
||||
<Target Name="clean">
|
||||
<Delete Files="@(OutputToDelete)" />
|
||||
</Target>
|
||||
</Project>
|
Reference in New Issue
Block a user