Skip to content

Commit

Permalink
Switch to current catch2 release (microsoft#809)
Browse files Browse the repository at this point in the history
* Switch to current catch2 release

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
  • Loading branch information
Alan-Jowett authored Mar 18, 2022
1 parent 159e1e4 commit 5e468b8
Show file tree
Hide file tree
Showing 21 changed files with 121 additions and 41 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ jobs:
- name: Create verifier project
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cd external\ebpf-verifier
mkdir build
cmake -B build
cmake -G "Visual Studio 16 2019" -S external\ebpf-verifier -B external\ebpf-verifier\build
- name: Create catch2 project
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cmake -G "Visual Studio 16 2019" -S external\catch2 -B external\catch2\build -DBUILD_TESTING=OFF
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ jobs:
- name: Create verifier project
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cd external\ebpf-verifier
mkdir build
cmake -B build
cmake -G "Visual Studio 16 2019" -S external\ebpf-verifier -B external\ebpf-verifier\build
- name: Create catch2 project
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cmake -G "Visual Studio 16 2019" -S external\catch2 -B external\catch2\build -DBUILD_TESTING=OFF
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/driver_test_vm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ jobs:
- name: Create verifier project
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cd external\ebpf-verifier
mkdir build
cmake -B build
cmake -G "Visual Studio 16 2019" -S external\ebpf-verifier -B external\ebpf-verifier\build
- name: Create catch2 project
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
cmake -G "Visual Studio 16 2019" -S external\catch2 -B external\catch2\build -DBUILD_TESTING=OFF
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
path = external/win-c
url = https://github.com/takamin/win-c.git
branch = windows
[submodule "external/Catch2"]
path = external/Catch2
url = https://github.com/catchorg/Catch2.git
5 changes: 3 additions & 2 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ The following steps need to be executed _once_ before the first build on a new c
1. Launch `Developer Command Prompt for VS 2019` by running `"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat"`.
2. Change directory to where the project is cloned, e.g. ```cd ebpf-for-windows```.
3. ```cmake -G "Visual Studio 16 2019" -S external\ebpf-verifier -B external\ebpf-verifier\build```
4. ```nuget restore ebpf-for-windows.sln```
5. ```del external\ebpf-verifier\build\obj\project.assets.json```
4. ```cmake -G "Visual Studio 16 2019" -S external\catch2 -B external\catch2\build -DBUILD_TESTING=OFF```
5. ```nuget restore ebpf-for-windows.sln```
6. ```del external\ebpf-verifier\build\obj\project.assets.json```

### Building using Developer Command Prompt for VS 2019
1. Launch `Developer Command Prompt for VS 2019`.
Expand Down
46 changes: 46 additions & 0 deletions ebpf-for-windows.sln
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "droppacket_km", "tests\samp
{B4AD72E3-754E-40CA-9CEA-D3F2C9170E51} = {B4AD72E3-754E-40CA-9CEA-D3F2C9170E51}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Catch2WithMain", "external\Catch2\build\src\Catch2WithMain.vcxproj", "{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Catch2", "external\Catch2\build\src\Catch2.vcxproj", "{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Expand Down Expand Up @@ -1352,6 +1356,46 @@ Global
{172DFDF9-3B0D-44AD-B780-92627EA469A2}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
{172DFDF9-3B0D-44AD-B780-92627EA469A2}.RelWithDebInfo|x86.Build.0 = Release|Win32
{172DFDF9-3B0D-44AD-B780-92627EA469A2}.RelWithDebInfo|x86.Deploy.0 = Release|Win32
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Debug|ARM.ActiveCfg = Debug|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Debug|ARM64.ActiveCfg = Debug|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Debug|x64.ActiveCfg = Debug|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Debug|x64.Build.0 = Debug|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Debug|x86.ActiveCfg = Debug|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.MinSizeRel|ARM.ActiveCfg = MinSizeRel|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.MinSizeRel|ARM64.ActiveCfg = MinSizeRel|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Release|ARM.ActiveCfg = Release|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Release|ARM64.ActiveCfg = Release|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Release|x64.ActiveCfg = Release|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Release|x64.Build.0 = Release|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.Release|x86.ActiveCfg = Release|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Debug|ARM.ActiveCfg = Debug|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Debug|ARM64.ActiveCfg = Debug|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Debug|x64.ActiveCfg = Debug|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Debug|x64.Build.0 = Debug|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Debug|x86.ActiveCfg = Debug|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.MinSizeRel|ARM.ActiveCfg = MinSizeRel|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.MinSizeRel|ARM64.ActiveCfg = MinSizeRel|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.MinSizeRel|x64.Build.0 = MinSizeRel|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.MinSizeRel|x86.ActiveCfg = MinSizeRel|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Release|ARM.ActiveCfg = Release|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Release|ARM64.ActiveCfg = Release|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Release|x64.ActiveCfg = Release|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Release|x64.Build.0 = Release|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.Release|x86.ActiveCfg = Release|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.RelWithDebInfo|ARM.ActiveCfg = RelWithDebInfo|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.RelWithDebInfo|ARM64.ActiveCfg = RelWithDebInfo|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1401,6 +1445,8 @@ Global
{54A59EC4-862D-4DEF-AB6B-4D69792FD212} = {AD7F828F-D4EF-4A71-BE63-9177B5B8AAB0}
{1BAF5F74-B71F-4088-8677-F27070302B59} = {54A59EC4-862D-4DEF-AB6B-4D69792FD212}
{172DFDF9-3B0D-44AD-B780-92627EA469A2} = {5C9E1337-D8EF-41AB-815D-E1990D19E4E0}
{8BD3552A-2CFB-4A59-AB15-2031B97ADA1E} = {492C9B22-9237-4996-9E33-CA14D3533616}
{8D538CBE-01BF-4A2E-A98A-6C368FDF13D7} = {492C9B22-9237-4996-9E33-CA14D3533616}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3D5F862D-74C6-4357-9F95-0B152E33B7B8}
Expand Down
1 change: 1 addition & 0 deletions external/Catch2
Submodule Catch2 added at 18c586
7 changes: 5 additions & 2 deletions tests/api_test/api_test.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\Platform;$(SolutionDir)libs\Platform\user;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\Platform;$(SolutionDir)libs\Platform\user;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<TreatWarningAsError>true</TreatWarningAsError>
<SupportJustMyCode>false</SupportJustMyCode>
Expand All @@ -145,7 +145,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;CONFIG_BPF_JIT_ALWAYS_ON=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\Platform;$(SolutionDir)libs\Platform\user;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)tests\end_to_end;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(SolutionDir)tests\sample\ext\inc;$(SolutionDir)libs\execution_context;$(SolutionDir)libs\Platform;$(SolutionDir)libs\Platform\user;$(SolutionDir)libs\thunk;$(SolutionDir)\netebpfext;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
Expand All @@ -166,6 +166,9 @@
<ProjectReference Include="..\..\ebpfapi\ebpfapi.vcxproj">
<Project>{75fe223a-3e45-4b0e-a2e8-04285e52e440}</Project>
</ProjectReference>
<ProjectReference Include="..\..\external\Catch2\build\src\Catch2WithMain.vcxproj">
<Project>{8bd3552a-2cfb-4a59-ab15-2031b97ada1e}</Project>
</ProjectReference>
<ProjectReference Include="..\..\rpc_interface\rpc_interface.vcxproj">
<Project>{1423245d-0249-40fc-a077-ff7780acfe3f}</Project>
</ProjectReference>
Expand Down
9 changes: 7 additions & 2 deletions tests/bpf2c_tests/bpf2c_tests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)tools\bpf2c;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ebpf-verifier\external\ELFIO;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)tools\bpf2c;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ebpf-verifier\external\ELFIO;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
Expand All @@ -137,7 +137,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)tools\bpf2c;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ebpf-verifier\external\ELFIO;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)tests\libs\util;$(SolutionDir)tests\libs\common;$(OutDir);$(SolutionDir)tools\bpf2c;$(SolutionDir)external\ubpf\vm;$(SolutionDir)external\ebpf-verifier\external\ELFIO;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
Expand Down Expand Up @@ -166,6 +166,11 @@
<ClInclude Include="..\..\tools\bpf2c\btf.h" />
<ClInclude Include="..\..\tools\bpf2c\btf_parser.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\external\Catch2\build\src\Catch2WithMain.vcxproj">
<Project>{8bd3552a-2cfb-4a59-ab15-2031b97ada1e}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down
1 change: 1 addition & 0 deletions tests/bpf2c_tests/raw_bpf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define CATCH_CONFIG_MAIN

#include "bpf_code_generator.h"
#define NUGET_CATCH
#include "catch_wrapper.hpp"

#define SEPERATOR "/"
Expand Down
7 changes: 5 additions & 2 deletions tests/client/ebpf_client.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)tests\libs\util;$(SolutionDir)libs\api;$(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)rpc_interface;$(SolutionDir)external\ebpf-verifier\external;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)\ebpfsvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)tests\libs\util;$(SolutionDir)libs\api;$(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)rpc_interface;$(SolutionDir)external\ebpf-verifier\external;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)\ebpfsvc;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<TreatWarningAsError>true</TreatWarningAsError>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
Expand All @@ -147,7 +147,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)tests\libs\util;$(SolutionDir)libs\api;$(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)rpc_interface;$(SolutionDir)external\ebpf-verifier\external;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)\ebpfsvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)libs\api_common;$(SolutionDir)tests\libs\util;$(SolutionDir)libs\api;$(SolutionDir)include;$(SolutionDir)libs\platform;$(SolutionDir)libs\platform\user;$(SolutionDir)rpc_interface;$(SolutionDir)external\ebpf-verifier\external;$(SolutionDir)external\ebpf-verifier\src;$(SolutionDir)\ebpfsvc;$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
Expand All @@ -166,6 +166,9 @@
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\external\Catch2\build\src\Catch2WithMain.vcxproj">
<Project>{8bd3552a-2cfb-4a59-ab15-2031b97ada1e}</Project>
</ProjectReference>
<ProjectReference Include="..\..\external\ebpf-verifier\build\ebpfverifier.vcxproj">
<Project>{7d5b4e68-c0fa-3f86-9405-f6400219b440}</Project>
</ProjectReference>
Expand Down
2 changes: 1 addition & 1 deletion tests/end_to_end/end_to_end.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ TEST_CASE("printk", "[end_to_end]")

capture_helper_t capture;
std::string output;
int hook_result;
int hook_result = 0;
errno_t error = capture.begin_capture();
if (error == NO_ERROR) {
hook.fire(&ctx, &hook_result);
Expand Down
4 changes: 2 additions & 2 deletions tests/libs/common/common_tests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)tests\libs\util;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\thunk;$(SolutionDir)tests\util;$(SolutionDir)tests\sample;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)tests\libs\util;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\thunk;$(SolutionDir)tests\util;$(SolutionDir)tests\sample;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
Expand All @@ -143,7 +143,7 @@
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)tests\libs\util;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\thunk;$(SolutionDir)tests\util;$(SolutionDir)tests\sample;$(OutDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)tests\libs\util;$(SolutionDir)include;$(SolutionDir)libs\api;$(SolutionDir)libs\thunk;$(SolutionDir)tests\util;$(SolutionDir)tests\sample;$(OutDir);$(SolutionDir)external\catch2\src;$(SolutionDir)external\catch2\build\generated-includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<TreatWarningAsError>true</TreatWarningAsError>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
Expand Down
6 changes: 6 additions & 0 deletions tests/libs/util/catch_wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@
#pragma warning(disable : 26816) // The pointer points to memory allocated on the stack

#define CATCH_CONFIG_COLOUR_NONE 1 // Disable color until https://github.com/catchorg/Catch2/issues/2345 is fixed.
#undef max
#undef min
#if defined(NUGET_CATCH)
#include "catch2/catch.hpp"
#else
#include "catch2/catch_all.hpp"
#endif
#pragma warning(pop)
Loading

0 comments on commit 5e468b8

Please sign in to comment.