remove submodule

This commit is contained in:
Justin Kotalik 2018-10-31 18:14:34 -07:00
parent 04d1f6813c
commit ce68c8e5be
13 changed files with 48 additions and 451 deletions

View File

@ -74,10 +74,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OverriddenServerWebSite", "
{439824F9-1455-4CC4-BD79-B44FA0A16552} = {439824F9-1455-4CC4-BD79-B44FA0A16552}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CommonLibTests", "test\CommonLibTests\CommonLibTests.vcxproj", "{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest", "test\gtest-1.8.0\msvc\gtest.vcxproj", "{2AF210A9-5BDC-45E8-95DD-07B5A2616493}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspNetCoreModuleV1", "AspNetCoreModuleV1", "{16E521CE-77F1-4B1C-A183-520A41C4F372}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AspNetCoreModuleV2", "AspNetCoreModuleV2", "{06CA2C2B-83B0-4D83-905A-E0C74790009E}"
@ -228,26 +224,6 @@ Global
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|x64.Build.0 = Release|x64
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|x86.ActiveCfg = Release|x86
{FC2A97F8-A749-4C04-97D1-97500066A820}.Release|x86.Build.0 = Release|x86
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Debug|Any CPU.ActiveCfg = Debug|Win32
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Debug|x64.ActiveCfg = Debug|x64
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Debug|x64.Build.0 = Debug|x64
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Debug|x86.ActiveCfg = Debug|Win32
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Debug|x86.Build.0 = Debug|Win32
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Release|Any CPU.ActiveCfg = Release|Win32
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Release|x64.ActiveCfg = Release|x64
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Release|x64.Build.0 = Release|x64
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Release|x86.ActiveCfg = Release|Win32
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1}.Release|x86.Build.0 = Release|Win32
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Debug|Any CPU.ActiveCfg = Debug|Win32
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Debug|x64.ActiveCfg = Debug|x64
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Debug|x64.Build.0 = Debug|x64
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Debug|x86.ActiveCfg = Debug|Win32
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Debug|x86.Build.0 = Debug|Win32
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Release|Any CPU.ActiveCfg = Release|Win32
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Release|x64.ActiveCfg = Release|x64
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Release|x64.Build.0 = Release|x64
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Release|x86.ActiveCfg = Release|Win32
{2AF210A9-5BDC-45E8-95DD-07B5A2616493}.Release|x86.Build.0 = Release|Win32
{4787A64F-9A3E-4867-A55A-70CB4B2B2FFE}.Debug|Any CPU.ActiveCfg = Debug|Win32
{4787A64F-9A3E-4867-A55A-70CB4B2B2FFE}.Debug|x64.ActiveCfg = Debug|x64
{4787A64F-9A3E-4867-A55A-70CB4B2B2FFE}.Debug|x64.Build.0 = Debug|x64
@ -325,8 +301,6 @@ Global
{064D860B-4D7C-4B1D-918F-E020F1B99E2A} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{744ACDC6-F6A0-4FF9-9421-F25C5F2DC520} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{FC2A97F8-A749-4C04-97D1-97500066A820} = {744ACDC6-F6A0-4FF9-9421-F25C5F2DC520}
{1EAC8125-1765-4E2D-8CBE-56DC98A1C8C1} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{2AF210A9-5BDC-45E8-95DD-07B5A2616493} = {EF30B533-D715-421A-92B7-92FEF460AC9C}
{16E521CE-77F1-4B1C-A183-520A41C4F372} = {04B1EDB6-E967-4D25-89B9-E6F8304038CD}
{06CA2C2B-83B0-4D83-905A-E0C74790009E} = {04B1EDB6-E967-4D25-89B9-E6F8304038CD}
{4787A64F-9A3E-4867-A55A-70CB4B2B2FFE} = {16E521CE-77F1-4B1C-A183-520A41C4F372}

View File

@ -0,0 +1,38 @@
Copyright (c) .NET Foundation and Contributors
All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
ASP.NET Core Module
Copyright (c) .NET Foundation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the ""Software""), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,3 @@
@ECHO OFF
SET RepoRoot="%~dp0..\.."
%RepoRoot%\build.cmd -LockFile %RepoRoot%\korebuild-lock.txt -Path %~dp0 %*

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
repo_root="$DIR/../.."
"$repo_root/build.sh" --path "$DIR" --lockfile "$repo_root/korebuild-lock.txt" "$@"

View File

@ -5,7 +5,6 @@
<Projects Include="$(SolutionDir)\src\AspNetCoreModuleV1\AspNetCore\AspNetCore.vcxproj" />
<Projects Include="$(SolutionDir)\src\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" />
<Projects Include="$(SolutionDir)\src\AspNetCoreModuleV2\RequestHandler\RequestHandler.vcxproj" />
<Projects Include="$(SolutionDir)\test\CommonLibTests\CommonLibTests.vcxproj">
</ItemGroup>
<Target Name="Build">

View File

@ -3,7 +3,6 @@
<PropertyGroup>
<CompileDependsOn Condition="'$(OS)'=='Windows_NT'">BuildNativeAssets;$(CompileDependsOn)</CompileDependsOn>
<PackageDependsOn Condition="'$(OS)'=='Windows_NT'">$(PackageDependsOn);PackageNativeProjects</PackageDependsOn>
<TestDependsOn>RunNativeTest;$(TestDependsOn)</TestDependsOn>
<NuGetVerifierRuleFile Condition="'$(OS)' != 'Windows_NT'">$(RepositoryRoot)NuGetPackageVerifier.xplat.json</NuGetVerifierRuleFile>
</PropertyGroup>
@ -26,8 +25,6 @@
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
<Exec Command="&quot;$(VisualStudioMSBuildx86Path)&quot; &quot;$(RepositoryRoot)src\AspNetCoreModuleV2\RequestHandler\RequestHandler.vcxproj&quot; $(BuildArgs) -p:Platform=%(Platforms.Identity) -bl:$(LogOutputDir)native.%(Platforms.Identity).binlog"
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
<Exec Command="&quot;$(VisualStudioMSBuildx86Path)&quot; &quot;$(RepositoryRoot)test\CommonLibTests\CommonLibTests.vcxproj&quot; $(BuildArgs) -p:Platform=%(Platforms.Identity) -bl:$(LogOutputDir)native.%(Platforms.Identity).binlog"
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
</Target>
<ItemGroup Condition=" '$(OS)' == 'Windows_NT' ">
@ -102,12 +99,4 @@
WorkingDirectory="$(RepositoryRoot)" />
</Target>
<Target Name="RunNativeTest" DependsOnTargets="GetToolsets">
<ItemGroup>
<Platforms Include="Win32;x64" />
</ItemGroup>
<Exec Command="&quot;$(VisualStudioMSBuildx86Path)&quot; &quot;$(RepositoryRoot)test\CommonLibTests\CommonLibTests.vcxproj&quot; /t:Test $(BuildArgs) -p:Platform=%(Platforms.Identity)"
Condition="'$(VisualStudioMSBuildx86Path)' != ''" />
</Target>
</Project>

View File

@ -1,151 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{1eac8125-1765-4e2d-8cbe-56dc98a1c8c1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<ItemGroup>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="hostfxr_utility_tests.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="utility_tests.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\AspNetCoreModuleV2\CommonLib\CommonLib.vcxproj">
<Project>{55494e58-e061-4c4c-a0a8-837008e72f85}</Project>
</ProjectReference>
<ProjectReference Include="..\..\src\AspNetCoreModuleV2\IISLib\IISLib.vcxproj">
<Project>{09d9d1d6-2951-4e14-bc35-76a23cf9391a}</Project>
</ProjectReference>
<ProjectReference Include="..\gtest-1.8.0\msvc\gtest.vcxproj">
<Project>{2af210a9-5bdc-45e8-95dd-07b5a2616493}</Project>
</ProjectReference>
</ItemGroup>
<ItemDefinitionGroup />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories);..\..\src\AspNetCoreModuleV2\IISLib;..\..\src\AspNetCoreModuleV2\CommonLib;..\gtest-1.8.0\include</AdditionalIncludeDirectories>
<AdditionalOptions>/D "_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" </AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<Lib>
<AdditionalDependencies>
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>X64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories);..\..\src\AspNetCoreModuleV2\IISLib;..\..\src\AspNetCoreModuleV2\CommonLib;..\gtest-1.8.0\include</AdditionalIncludeDirectories>
<AdditionalOptions>/D "_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" </AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
</Link>
<Lib>
<AdditionalDependencies>
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories);..\..\src\AspNetCoreModuleV2\IISLib;..\..\src\AspNetCoreModuleV2\CommonLib;..\gtest-1.8.0\include</AdditionalIncludeDirectories>
<AdditionalOptions>/D "_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" </AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Lib>
<AdditionalDependencies>
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile>
<PreprocessorDefinitions>X64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include;%(AdditionalIncludeDirectories);..\..\src\AspNetCoreModuleV2\IISLib;..\..\src\AspNetCoreModuleV2\CommonLib;..\gtest-1.8.0\include</AdditionalIncludeDirectories>
<AdditionalOptions>/D "_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" </AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
<Lib>
<AdditionalDependencies>
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<Import Project=".\NativeTests.targets" />
</Project>

View File

@ -1,8 +0,0 @@
<Project>
<PropertyGroup>
<VsTestConsole>$(VCIDEInstallDir)..\CommonExtensions\Microsoft\TestWindow\vstest.console.exe</VsTestConsole>
</PropertyGroup>
<Target Name="Test" DependsOnTargets="Build">
<Exec Command="&quot;$(TargetPath)&quot;" />
</Target>
</Project>

View File

@ -1,140 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#include "stdafx.h"
TEST(ParseHostFxrArguments, BasicHostFxrArguments)
{
DWORD retVal = 0;
BSTR* bstrArray;
PCWSTR exeStr = L"C:/Program Files/dotnet.exe";
HRESULT hr = HOSTFXR_UTILITY::ParseHostfxrArguments(
L"exec \"test.dll\"", // args
exeStr, // exe path
L"invalid", // physical path to application
NULL, // event log
&retVal, // arg count
&bstrArray); // args array.
EXPECT_EQ(hr, S_OK);
EXPECT_EQ(DWORD(3), retVal);
ASSERT_STREQ(exeStr, bstrArray[0]);
ASSERT_STREQ(L"exec", bstrArray[1]);
ASSERT_STREQ(L"test.dll", bstrArray[2]);
}
TEST(ParseHostFxrArguments, NoExecProvided)
{
DWORD retVal = 0;
BSTR* bstrArray;
PCWSTR exeStr = L"C:/Program Files/dotnet.exe";
HRESULT hr = HOSTFXR_UTILITY::ParseHostfxrArguments(
L"test.dll", // args
exeStr, // exe path
L"ignored", // physical path to application
NULL, // event log
&retVal, // arg count
&bstrArray); // args array.
EXPECT_EQ(hr, S_OK);
EXPECT_EQ(DWORD(2), retVal);
ASSERT_STREQ(exeStr, bstrArray[0]);
ASSERT_STREQ(L"test.dll", bstrArray[1]);
}
TEST(ParseHostFxrArguments, ConvertDllToAbsolutePath)
{
DWORD retVal = 0;
BSTR* bstrArray;
PCWSTR exeStr = L"C:/Program Files/dotnet.exe";
HRESULT hr = HOSTFXR_UTILITY::ParseHostfxrArguments(
L"exec \"test.dll\"", // args
exeStr, // exe path
L"C:/test", // physical path to application
NULL, // event log
&retVal, // arg count
&bstrArray); // args array.
EXPECT_EQ(hr, S_OK);
EXPECT_EQ(DWORD(3), retVal);
ASSERT_STREQ(exeStr, bstrArray[0]);
ASSERT_STREQ(L"exec", bstrArray[1]);
ASSERT_STREQ(L"C:\\test\\test.dll", bstrArray[2]);
}
TEST(ParseHostFxrArguments, ProvideNoArgs_InvalidArgs)
{
DWORD retVal = 0;
BSTR* bstrArray;
PCWSTR exeStr = L"C:/Program Files/dotnet.exe";
HRESULT hr = HOSTFXR_UTILITY::ParseHostfxrArguments(
L"", // args
exeStr, // exe path
L"ignored", // physical path to application
NULL, // event log
&retVal, // arg count
&bstrArray); // args array.
EXPECT_EQ(E_INVALIDARG, hr);
}
TEST(GetAbsolutePathToDotnetFromProgramFiles, BackupWorks)
{
STRU struAbsolutePathToDotnet;
HRESULT hr = S_OK;
BOOL fDotnetInProgramFiles;
BOOL is64Bit;
BOOL fIsWow64 = FALSE;
SYSTEM_INFO systemInfo;
IsWow64Process(GetCurrentProcess(), &fIsWow64);
if (fIsWow64)
{
is64Bit = FALSE;
}
else
{
GetNativeSystemInfo(&systemInfo);
is64Bit = systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64;
}
if (is64Bit)
{
fDotnetInProgramFiles = UTILITY::CheckIfFileExists(L"C:/Program Files/dotnet/dotnet.exe");
}
else
{
fDotnetInProgramFiles = UTILITY::CheckIfFileExists(L"C:/Program Files (x86)/dotnet/dotnet.exe");
}
hr = HOSTFXR_UTILITY::GetAbsolutePathToDotnetFromProgramFiles(&struAbsolutePathToDotnet);
if (fDotnetInProgramFiles)
{
EXPECT_EQ(hr, S_OK);
}
else
{
EXPECT_NE(hr, S_OK);
EXPECT_TRUE(struAbsolutePathToDotnet.IsEmpty());
}
}
TEST(GetHostFxrArguments, InvalidParams)
{
DWORD retVal = 0;
BSTR* bstrArray;
STRU struHostFxrDllLocation;
HRESULT hr = HOSTFXR_UTILITY::GetHostFxrParameters(
INVALID_HANDLE_VALUE,
L"bogus", // processPath
L"", // application physical path, ignored.
L"ignored", //arguments
NULL, // event log
&retVal, // arg count
&bstrArray); // args array.
EXPECT_EQ(E_INVALIDARG, hr);
}

View File

@ -1,15 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#include "stdafx.h"
#if defined(_WIN32)
int wmain(int argc, wchar_t* argv[])
#else
int main(int argc, char* argv[])
#endif
{
::testing::InitGoogleTest(&argc, argv);
RUN_ALL_TESTS();
return 0;
}

View File

@ -1,4 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#include "stdafx.h"

View File

@ -1,54 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
#pragma once
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <atlbase.h>
#include <pdh.h>
#include <vector>
#include <Shlobj.h>
#include <httpserv.h>
#include <winhttp.h>
#include <httptrace.h>
#include <cstdlib>
#include <wchar.h>
#include <io.h>
#include <stdio.h>
#include <hashfn.h>
#include <hashtable.h>
#include "stringa.h"
#include "stringu.h"
#include "dbgutil.h"
#include "ahutil.h"
#include "multisz.h"
#include "multisza.h"
#include "base64.h"
#include <listentry.h>
#include <datetime.h>
#include <reftrace.h>
#include <acache.h>
#include <time.h>
#include "stringu.h"
#include "stringa.h"
#include "multisz.h"
#include "dbgutil.h"
#include "ahutil.h"
#include "hashfn.h"
#include "hostfxr_utility.h"
#include "environmentvariablehash.h"
#include "aspnetcoreconfig.h"
#include "application.h"
#include "utility.h"
#include "debugutil.h"
#include "requesthandler.h"
#include "resources.h"
#include "aspnetcore_msg.h"
#undef assert // Macro redefinition in IISLib.
#include "gtest\gtest.h"

View File

@ -1,41 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
#include "stdafx.h"
TEST(PassUnexpandedEnvString, ExpandsResult)
{
HRESULT hr = S_OK;
PCWSTR unexpandedString = L"ANCM_TEST_ENV_VAR";
PCWSTR unexpandedStringValue = L"foobar";
STRU struExpandedString;
SetEnvironmentVariable(L"ANCM_TEST_ENV_VAR", unexpandedStringValue);
hr = struExpandedString.CopyAndExpandEnvironmentStrings(L"%ANCM_TEST_ENV_VAR%");
EXPECT_EQ(hr, S_OK);
EXPECT_STREQ(L"foobar", struExpandedString.QueryStr());
}
TEST(PassUnexpandedEnvString, LongStringExpandsResults)
{
HRESULT hr = S_OK;
PCWSTR unexpandedString = L"ANCM_TEST_ENV_VAR_LONG";
STRU struStringValue;
STACK_STRU(struExpandedString, MAX_PATH);
struStringValue.Append(L"TestValueThatIsLongerThan256CharactersLongToTriggerResize");
struStringValue.Append(L"TestValueThatIsLongerThan256CharactersLongToTriggerResize");
struStringValue.Append(L"TestValueThatIsLongerThan256CharactersLongToTriggerResize");
struStringValue.Append(L"TestValueThatIsLongerThan256CharactersLongToTriggerResize");
struStringValue.Append(L"TestValueThatIsLongerThan256CharactersLongToTriggerResize");
struStringValue.Append(L"TestValueThatIsLongerThan256CharactersLongToTriggerResize");
SetEnvironmentVariable(unexpandedString, struStringValue.QueryStr());
hr = struExpandedString.CopyAndExpandEnvironmentStrings(L"%ANCM_TEST_ENV_VAR_LONG%");
EXPECT_EQ(hr, S_OK);
EXPECT_EQ(struStringValue.QueryCCH(), struExpandedString.QueryCCH());
// The values are exactly the same, however EXPECT_EQ is returning false.
//EXPECT_EQ(struStringValue.QueryStr(), struExpandedString.QueryStr());
EXPECT_STREQ(struStringValue.QueryStr(), struExpandedString.QueryStr());
}