From e06cca7b44f02c58d757a290d09b01116da4d566 Mon Sep 17 00:00:00 2001 From: Max Golovanov Date: Tue, 4 Sep 2018 10:24:51 -0700 Subject: [PATCH] Fix building unit and functional tests from command line --- Solutions/win32-cpp/Win32.vcxproj | 3 - Solutions/win32-static/win32-static.vcxproj | 259 ------------------ .../win32-static/win32-static.vcxproj.filters | 17 -- build-Win32Debug.bat | 21 +- build-Win32Release.bat | 20 +- build-all.bat | 8 +- build-x64Debug.bat | 20 +- build-x64Release.bat | 22 +- lib/include/public/Version.hpp | 6 +- tests/common/MockIOfflineStorage.hpp | 2 +- 10 files changed, 25 insertions(+), 353 deletions(-) delete mode 100644 Solutions/win32-static/win32-static.vcxproj delete mode 100644 Solutions/win32-static/win32-static.vcxproj.filters diff --git a/Solutions/win32-cpp/Win32.vcxproj b/Solutions/win32-cpp/Win32.vcxproj index 0e1ee639..2234079a 100644 --- a/Solutions/win32-cpp/Win32.vcxproj +++ b/Solutions/win32-cpp/Win32.vcxproj @@ -243,9 +243,6 @@ {216a8e97-21f7-4bef-9e52-7f772c177c32} - - {82c8ee9a-f706-4a97-9eea-1d7b5fc9e6db} - diff --git a/Solutions/win32-static/win32-static.vcxproj b/Solutions/win32-static/win32-static.vcxproj deleted file mode 100644 index 2e617a53..00000000 --- a/Solutions/win32-static/win32-static.vcxproj +++ /dev/null @@ -1,259 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - - - - - - - - - {2ebc7b3c-2af1-442c-9285-cab39bbb8c00} - - - - {82C8EE9A-F706-4A97-9EEA-1D7B5FC9E6DB} - Win32DllProj - ClientTelemetry - win32-static - 10.0.15005.0 - - - - StaticLibrary - true - v140 - Unicode - win-x86_vs2015-crtdynamic-debug - false - - - StaticLibrary - false - v140 - true - Unicode - win-x86_vs2015-crtdynamic-release - - - StaticLibrary - true - v140 - Unicode - win-x64_vs2015-crtdynamic-debug - false - - - StaticLibrary - false - v140 - false - Unicode - win-x64_vs2015-crtdynamic-release - - - - - - - - - - - - - - - true - ClientTelemetry - - - *.cdf;*.cache;*.obj;*.pdb;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi - $(SolutionDir)\..\sqlite;$(VC_IncludePath);$(SolutionDir)\..;$(SolutionDir)\..\ctsdk;$(SolutionDir)\PAL.Shared - $(AriaDepsLibPath);$(LibraryPath) - - - - *.cdf;*.cache;*.obj;*.pdb;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi - $(SolutionDir)\..\sqlite;$(VC_IncludePath);$(SolutionDir)\..;$(SolutionDir)\..\ctsdk;$(SolutionDir)\PAL.Shared - $(AriaDepsLibPath);$(LibraryPath) - - - - *.cdf;*.cache;*.obj;*.pdb;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi - $(SolutionDir)\..\sqlite;$(VC_IncludePath);$(SolutionDir)\..;$(SolutionDir)\..\ctsdk;$(SolutionDir)\PAL.Shared - $(AriaDepsLibPath);$(LibraryPath) - - - - *.cdf;*.cache;*.obj;*.pdb;*.obj.enc;*.ilk;*.ipdb;*.iobj;*.resources;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;*.tlog;*.manifest;*.res;*.pch;*.exp;*.idb;*.rep;*.xdc;*.pdb;*_manifest.rc;*.bsc;*.sbr;*.xml;*.metagen;*.bi - $(SolutionDir)\..\sqlite;$(VC_IncludePath);$(SolutionDir)\..;$(SolutionDir)\..\ctsdk;$(SolutionDir)\PAL.Shared - $(AriaDepsLibPath);$(LibraryPath) - - - - - - - Level3 - Disabled - _ARIA_UTC_SDK;NO_ROAM_SUP;USE_TIMERSHIM2;USE_SQLITE;_WIN32_WINNT=0x0601;ARIASDK_SHARED_LIB;_CRT_SECURE_NO_WARNINGS;USE_BOND;BOND_COMPACT_BINARY_PROTOCOL;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - ..\..;..\..\include;..\..\src;..\..\internal;..\..\common;..\..\src\SemanticApi\src\datamodel;..\..\src\SemanticApi\physical\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - ProgramDatabase - false - false - NoListing - NoListing - false - false - false - false - MultiThreadedDebugDLL - MultiThreadedDebugDLL - 4503 - 4503 - - - Windows - true - msxml6.lib;wininet.lib;%(AdditionalDependencies) - %(AdditionalLibraryDirectories) - - - - - - - false - true - false - Default - LinkVerboseLib - - - false - false - - - true - true - false - false - true - true - - - true - true - true - - - - %(AdditionalLibraryDirectories) - MachineX86 - - - true - - - - - - %(AdditionalLibraryDirectories) - - - - - Level3 - - - - MinSpace - Size - - Disabled - true - false - _ARIA_UTC_SDK;NO_ROAM_SUP;USE_TIMERSHIM2;USE_SQLITE;_WIN32_WINNT=0x0601;ARIASDK_SHARED_LIB;_CRT_SECURE_NO_WARNINGS;USE_BOND;BOND_COMPACT_BINARY_PROTOCOL;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - ..\..;..\..\include;..\..\src;..\..\internal;..\..\common;..\..\src\SemanticApi\src\datamodel;..\..\src\SemanticApi\physical\include;$(ProjectDir);$(GeneratedFilesDir);$(IntDir);%(AdditionalIncludeDirectories) - false - false - NoListing - false - false - MultiThreadedDLL - 4503 - 4503 - false - - - Windows - true - true - true - msxml6.lib;wininet.lib;%(AdditionalDependencies) - %(AdditionalLibraryDirectories) - - - - - - - false - true - false - LinkVerboseLib - - - false - false - - - Default - Default - false - false - true - true - - - true - true - true - - - - %(AdditionalLibraryDirectories) - MachineX86 - - - - - - %(AdditionalLibraryDirectories) - - - - - - - \ No newline at end of file diff --git a/Solutions/win32-static/win32-static.vcxproj.filters b/Solutions/win32-static/win32-static.vcxproj.filters deleted file mode 100644 index dfb86514..00000000 --- a/Solutions/win32-static/win32-static.vcxproj.filters +++ /dev/null @@ -1,17 +0,0 @@ - - - - - {7ff9cecd-1aea-4d2e-8861-35796c83e915} - - - - - - - - - Resource Files - - - \ No newline at end of file diff --git a/build-Win32Debug.bat b/build-Win32Debug.bat index 320d3950..41c3799e 100644 --- a/build-Win32Debug.bat +++ b/build-Win32Debug.bat @@ -1,27 +1,14 @@ @echo off call tools\gen-version.cmd @setlocal ENABLEEXTENSIONS -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Building projects using MSBuild... ** -echo *************************************************************************************************** -echo *************************************************************************************************** +echo "Building using Visual Studio 2017 tools" +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS% set platform= +set SOLUTION=Solutions\AriaSDK.sln -REM Disable parallel builds for now because of a vs2013 bug that randomly triggers : -REM cl : Command line error D8040: error creating or communicating with child process -REM Start in clienttelemetry - -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Creating Win32 Debug ... ** -echo *************************************************************************************************** -echo *************************************************************************************************** -msbuild Solutions\AriaSDK.sln /target:build\build-sdk /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=Win32 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,gmock,gtest,UnitTests,FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=Win32 Solutions\out\Debug\Win32\UnitTests\UnitTests.exe Solutions\out\Debug\Win32\FuncTests\FuncTests.exe - diff --git a/build-Win32Release.bat b/build-Win32Release.bat index b11a330d..259c7c13 100644 --- a/build-Win32Release.bat +++ b/build-Win32Release.bat @@ -1,26 +1,14 @@ @echo off call tools\gen-version.cmd @setlocal ENABLEEXTENSIONS -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Building projects using MSBuild... ** -echo *************************************************************************************************** -echo *************************************************************************************************** +echo "Building using Visual Studio 2017 tools" +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS% set platform= +set SOLUTION=Solutions\AriaSDK.sln -REM Disable parallel builds for now because of a vs2013 bug that randomly triggers : -REM cl : Command line error D8040: error creating or communicating with child process -REM Start in clienttelemetry - -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Creating Win32 Release ... ** -echo *************************************************************************************************** -echo *************************************************************************************************** -msbuild Solutions\AriaSDK.sln /target:build\build-sdk /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=Win32 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,Tests\gmock,Tests\gtest,Tests\UnitTests,Tests\FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=Win32 Solutions\out\Release\Win32\UnitTests\UnitTests.exe Solutions\out\Release\Win32\FuncTests\FuncTests.exe diff --git a/build-all.bat b/build-all.bat index 532fc856..b86afcb5 100644 --- a/build-all.bat +++ b/build-all.bat @@ -9,11 +9,11 @@ set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS% set platform= set SOLUTION=Solutions\AriaSDK.sln -msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-static,net40,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=Win32 -msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-static,net40,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=Win32 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,UnitTests,FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=Win32 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,UnitTests,FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=Win32 -msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-static,net40,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=x64 -msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-static,net40,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=x64 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,UnitTests,FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=x64 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,UnitTests,FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=x64 msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=ARM msbuild %SOLUTION% /target:zlib,sqlite-uwp,win10-cs,win10-dll /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=ARM diff --git a/build-x64Debug.bat b/build-x64Debug.bat index 476520f5..a86a36d1 100644 --- a/build-x64Debug.bat +++ b/build-x64Debug.bat @@ -1,26 +1,14 @@ @echo off call tools\gen-version.cmd @setlocal ENABLEEXTENSIONS -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Building projects using MSBuild... ** -echo *************************************************************************************************** -echo *************************************************************************************************** +echo "Building using Visual Studio 2017 tools" +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS% set platform= +set SOLUTION=Solutions\AriaSDK.sln -REM Disable parallel builds for now because of a vs2013 bug that randomly triggers : -REM cl : Command line error D8040: error creating or communicating with child process -REM Start in clienttelemetry - -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Creating x64 Debug ... ** -echo *************************************************************************************************** -echo *************************************************************************************************** -msbuild Solutions\AriaSDK.sln /target:build\build-sdk /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=x64 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,gmock,gtest,UnitTests,FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Debug /p:Platform=x64 Solutions\out\Debug\x64\UnitTests\UnitTests.exe Solutions\out\Debug\x64\FuncTests\FuncTests.exe diff --git a/build-x64Release.bat b/build-x64Release.bat index a8ef40ac..a7c6d9af 100644 --- a/build-x64Release.bat +++ b/build-x64Release.bat @@ -1,26 +1,14 @@ @echo off call tools\gen-version.cmd @setlocal ENABLEEXTENSIONS -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat" -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Building projects using MSBuild... ** -echo *************************************************************************************************** -echo *************************************************************************************************** +echo "Building using Visual Studio 2017 tools" +call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" set MAXCPUCOUNT=%NUMBER_OF_PROCESSORS% set platform= +set SOLUTION=Solutions\AriaSDK.sln -REM Disable parallel builds for now because of a vs2013 bug that randomly triggers : -REM cl : Command line error D8040: error creating or communicating with child process -REM Start in clienttelemetry - -echo *************************************************************************************************** -echo *************************************************************************************************** -echo ** Creating x64 Release ... ** -echo *************************************************************************************************** -echo *************************************************************************************************** -msbuild Solutions\AriaSDK.sln /target:build\build-sdk /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=x64 +msbuild %SOLUTION% /target:sqlite,zlib,sqlite-uwp,win32-dll,win32-lib,net40,win10-cs,win10-dll,gmock,gtest,UnitTests,FuncTests /p:BuildProjectReferences=true /maxcpucount:%MAXCPUCOUNT% /detailedsummary /p:Configuration=Release /p:Platform=x64 Solutions\out\Release\x64\UnitTests\UnitTests.exe -Solutions\out\Release\x64\FuncTests\FuncTests.exe +Solutions\out\Release\x64\FuncTests\FuncTests.exe \ No newline at end of file diff --git a/lib/include/public/Version.hpp b/lib/include/public/Version.hpp index c04cb2ee..bfb2e979 100644 --- a/lib/include/public/Version.hpp +++ b/lib/include/public/Version.hpp @@ -2,8 +2,8 @@ // WARNING: DO NOT MODIFY THIS FILE! // Copyright (c) Microsoft. All rights reserved. // This file has been automatically generated, manual changes will be lost. -#define BUILD_VERSION_STR "3.0.243.1" -#define BUILD_VERSION 3,0,243,1 +#define BUILD_VERSION_STR "3.0.247.1" +#define BUILD_VERSION 3,0,247,1 #ifndef RESOURCE_COMPILER_INVOKED #include @@ -24,7 +24,7 @@ namespace ARIASDK_NS_BEGIN { uint64_t const Version = ((uint64_t)3 << 48) | ((uint64_t)0 << 32) | - ((uint64_t)243 << 16) | + ((uint64_t)247 << 16) | ((uint64_t)1); // TODO: [MG] - move declaration of ARIA_SDK_UNUSED to separate include file diff --git a/tests/common/MockIOfflineStorage.hpp b/tests/common/MockIOfflineStorage.hpp index d4c76df6..46a56ef0 100644 --- a/tests/common/MockIOfflineStorage.hpp +++ b/tests/common/MockIOfflineStorage.hpp @@ -23,7 +23,7 @@ class MockIOfflineStorage : public ARIASDK_NS::IOfflineStorage { MOCK_METHOD4(ReleaseRecords, void(std::vector const &, bool, ARIASDK_NS::HttpHeaders, bool&)); MOCK_METHOD2(StoreSetting, bool(std::string const &, std::string const &)); MOCK_METHOD1(GetSetting, std::string(std::string const &)); - MOCK_METHOD0(GetSize, unsigned()); + MOCK_METHOD0(GetSize, size_t()); MOCK_METHOD3(GetRecords, std::vector*(bool, ARIASDK_NS::EventLatency, unsigned)); MOCK_METHOD0(ResizeDb, bool()); };