Skip to content

Commit

Permalink
moved CSV generation into batch file to be invoked manually
Browse files Browse the repository at this point in the history
  • Loading branch information
csoltenborn committed Feb 13, 2016
1 parent 9b0933d commit a8c2777
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
21 changes: 21 additions & 0 deletions GoogleTestAdapter/VsPackage.Tests.Generated/GenerateCSV.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off

set BASE_DIR=%~dp0

set PICT_EXE="%BASE_DIR%pict\pict.exe"
set MODEL="%BASE_DIR%GTA_Console.pictmodel"
set CSV="%BASE_DIR%GTA_Console.csv"
set TEMP_SEED="%BASE_DIR%seed.pictmodel"


if exist %CSV% (
echo Generating test data using existing data as seed =====
mv %CSV% %TEMP_SEED%
%PICT_EXE% %MODEL% -a:# -e:%TEMP_SEED% >%CSV%
del %TEMP_SEED%
) else (
echo Generating test data from scratch =====
%PICT_EXE% %MODEL% -a:# >%CSV%
)
echo ===== Generation done, target file is
echo %CSV%
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,8 @@
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>if exist "$(ProjectDir)GTA_Console.csv" (
mv "$(ProjectDir)GTA_Console.csv" "$(ProjectDir)seed"
echo "Generating test data using existing data as seed"
$(ProjectDir)pict\pict.exe $(ProjectDir)GTA_Console.pictmodel -a:# -e:"$(ProjectDir)seed" &gt;"$(ProjectDir)GTA_Console.csv"
del "$(ProjectDir)seed"
) else (
echo "Generating test data from scratch"
$(ProjectDir)pict\pict.exe $(ProjectDir)GTA_Console.pictmodel -a:# &gt;"$(ProjectDir)GTA_Console.csv"
)</PreBuildEvent>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<Import Project="..\packages\Clarius.TransformOnBuild-unofficial.1.20\build\Clarius.TransformOnBuild-unofficial.targets" Condition="Exists('..\packages\Clarius.TransformOnBuild-unofficial.1.20\build\Clarius.TransformOnBuild-unofficial.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down

0 comments on commit a8c2777

Please sign in to comment.