Skip to content

Commit d9db158

Browse files
author
Stewart Miles
committed
Added integration test framework.
Added an integration test framework from the Android Resolver integration test. Bug: 150471207 Change-Id: I0606b13df140f75afdf11bf73d68d7d0b26b4ef0
1 parent 06037e1 commit d9db158

File tree

8 files changed

+588
-2
lines changed

8 files changed

+588
-2
lines changed

build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,6 +1680,18 @@ createUnityTestBatchAndNonBatch(
16801680
[buildPlugin],
16811681
new File(project.ext.scriptDirectory, "source/VersionHandler/test/reflection"), [], null)
16821682

1683+
Task compileIntegrationTester = createXbuildTask(
1684+
"compileIntegrationTester",
1685+
"Compile Integration Tester module.",
1686+
project.ext.pluginSolutionFile,
1687+
"IntegrationTester",
1688+
fileTree(new File(project.ext.pluginSourceDir,
1689+
"IntegrationTester")),
1690+
new File(project.ext.buildDir, "IntegrationTester"),
1691+
[new File("Google.IntegrationTester.dll"),
1692+
new File("Google.IntegrationTester.dll.mdb")],
1693+
[compileVersionHandler])
1694+
16831695
createUnityTestBatchAndNonBatch(
16841696
"testAndroidResolverAsyncResolve",
16851697
("Imports the plugin into a Unity project, runs Android resolution with " +

source/ExternalDependencyManager.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JarResolverLib", "JarResolv
55
EndProject
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JarResolverTests", "JarResolverTests\JarResolverTests.csproj", "{593254D7-6358-40A6-B0C8-F0616BBF499D}"
77
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationTester", "IntegrationTester\IntegrationTester.csproj", "{DBD8D4D9-61AC-4E75-8CDC-CABE7033A040}"
9+
EndProject
810
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AndroidResolver", "AndroidResolver\AndroidResolver.csproj", "{82EEDFBE-AFE4-4DEF-99D9-BC929747DD9A}"
911
EndProject
1012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VersionHandler", "VersionHandler\VersionHandler.csproj", "{5378B37A-887E-49ED-A8AE-42FA843AA9DC}"
@@ -29,6 +31,10 @@ Global
2931
{593254D7-6358-40A6-B0C8-F0616BBF499D}.Debug|Any CPU.Build.0 = Debug|Any CPU
3032
{593254D7-6358-40A6-B0C8-F0616BBF499D}.Release|Any CPU.ActiveCfg = Release|Any CPU
3133
{593254D7-6358-40A6-B0C8-F0616BBF499D}.Release|Any CPU.Build.0 = Release|Any CPU
34+
{DBD8D4D9-61AC-4E75-8CDC-CABE7033A040}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{DBD8D4D9-61AC-4E75-8CDC-CABE7033A040}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{DBD8D4D9-61AC-4E75-8CDC-CABE7033A040}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{DBD8D4D9-61AC-4E75-8CDC-CABE7033A040}.Release|Any CPU.Build.0 = Release|Any CPU
3238
{82EEDFBE-AFE4-4DEF-99D9-BC929747DD9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
3339
{82EEDFBE-AFE4-4DEF-99D9-BC929747DD9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
3440
{82EEDFBE-AFE4-4DEF-99D9-BC929747DD9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{DBD8D4D9-61AC-4E75-8CDC-CABE7033A040}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<RootNamespace>Google</RootNamespace>
11+
<AssemblyName>Google.IntegrationTester</AssemblyName>
12+
<ReleaseVersion>1.2</ReleaseVersion>
13+
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>True</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>False</Optimize>
19+
<OutputPath>bin\Debug</OutputPath>
20+
<DefineConstants>DEBUG;UNITY_EDITOR</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
<ConsolePause>False</ConsolePause>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugSymbols>True</DebugSymbols>
27+
<DebugType>full</DebugType>
28+
<Optimize>True</Optimize>
29+
<OutputPath>bin\Release</OutputPath>
30+
<DefineConstants>DEBUG;UNITY_EDITOR</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
<ConsolePause>False</ConsolePause>
34+
</PropertyGroup>
35+
<PropertyGroup>
36+
<UnityHintPath>..\..\unity_dlls</UnityHintPath>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="UnityEditor">
40+
<HintPath>$(UnityHintPath)/UnityEditor.dll</HintPath>
41+
</Reference>
42+
<Reference Include="UnityEngine">
43+
<HintPath>$(UnityHintPath)/UnityEngine.dll</HintPath>
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Core" />
47+
<Reference Include="System.Xml" />
48+
</ItemGroup>
49+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
50+
<ItemGroup>
51+
<Folder Include="src\" />
52+
<Folder Include="Properties\" />
53+
</ItemGroup>
54+
<ItemGroup>
55+
<Compile Include="src\Runner.cs" />
56+
<Compile Include="src\TestCase.cs" />
57+
<Compile Include="src\TestCaseResult.cs" />
58+
<Compile Include="Properties\AssemblyInfo.cs" />
59+
</ItemGroup>
60+
<ItemGroup>
61+
<ProjectReference Include="..\VersionHandler\VersionHandler.csproj">
62+
<Project>{5378B37A-887E-49ED-A8AE-42FA843AA9DC}</Project>
63+
<Name>VersionHandler</Name>
64+
</ProjectReference>
65+
<ProjectReference Include="..\VersionHandlerImpl\VersionHandlerImpl.csproj">
66+
<Project>{1E162334-8EA2-440A-9B3A-13FD8FE5C22E}</Project>
67+
<Name>VersionHandlerImpl</Name>
68+
</ProjectReference>
69+
</ItemGroup>
70+
</Project>
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// <copyright file="AssemblyInfo.cs" company="Google LLC">
2+
// Copyright (C) 2020 Google Inc. All Rights Reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
// </copyright>
16+
17+
using System.Reflection;
18+
using System.Runtime.CompilerServices;
19+
20+
// Information about this assembly is defined by the following attributes.
21+
// Change them to the values specific to your project.
22+
[assembly: AssemblyTitle("Google.IntegrationTester")]
23+
[assembly: AssemblyDescription("")]
24+
[assembly: AssemblyConfiguration("")]
25+
[assembly: AssemblyCompany("Google Inc.")]
26+
[assembly: AssemblyProduct("")]
27+
[assembly: AssemblyCopyright("Copyright 2016")]
28+
[assembly: AssemblyTrademark("")]
29+
[assembly: AssemblyCulture("")]
30+
31+
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
32+
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
33+
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
34+
[assembly: AssemblyVersion("1.2.0.0")]
35+
36+
// The following attributes are used to specify the signing key for the assembly,
37+
// if desired. See the Mono documentation for more information about signing.
38+
39+
// [assembly: AssemblyDelaySign(false)]
40+
// // <copyright file="ResolutionException.cs" company="Google LLC">
41+
// Copyright (C) 2016 Google Inc. All Rights Reserved.
42+
//
43+
// Licensed under the Apache License, Version 2.0 (the "License");
44+
// you may not use this file except in compliance with the License.
45+
// You may obtain a copy of the License at
46+
//
47+
// http://www.apache.org/licenses/LICENSE-2.0
48+
//
49+
// Unless required by applicable law or agreed to in writing, software
50+
// distributed under the License is distributed on an "AS IS" BASIS,
51+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52+
// See the License for the specific language governing permissions and
53+
// limitations under the License.
54+
// </copyright>[assembly: AssemblyKeyFile("")]
55+

0 commit comments

Comments
 (0)