diff --git a/GoogleTestAdapter/VsPackage.Tests.Generated/GenerateCSV.bat b/GoogleTestAdapter/VsPackage.Tests.Generated/GenerateCSV.bat new file mode 100644 index 000000000..b482ff012 --- /dev/null +++ b/GoogleTestAdapter/VsPackage.Tests.Generated/GenerateCSV.bat @@ -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% diff --git a/GoogleTestAdapter/VsPackage.Tests.Generated/VsPackage.Tests.Generated.csproj b/GoogleTestAdapter/VsPackage.Tests.Generated/VsPackage.Tests.Generated.csproj index 1765e3500..daad9682b 100644 --- a/GoogleTestAdapter/VsPackage.Tests.Generated/VsPackage.Tests.Generated.csproj +++ b/GoogleTestAdapter/VsPackage.Tests.Generated/VsPackage.Tests.Generated.csproj @@ -147,15 +147,8 @@ - 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" >"$(ProjectDir)GTA_Console.csv" - del "$(ProjectDir)seed" -) else ( - echo "Generating test data from scratch" - $(ProjectDir)pict\pict.exe $(ProjectDir)GTA_Console.pictmodel -a:# >"$(ProjectDir)GTA_Console.csv" -) + +