Merge remote-tracking branch 'origin/master' into booleans
This commit is contained in:
commit
6c71e2dec2
11 changed files with 109 additions and 216 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit da60e2a608b257720e7a5a6019b66768ce789aaf
|
||||
Subproject commit 00222e4a2c8d1882bc6c9e29072465fe30ec48af
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>MatterControl.AutomationTests</RootNamespace>
|
||||
<AssemblyName>MatterControl.AutomationTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
|
|
@ -117,4 +117,4 @@
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@
|
|||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Utilities\ManifestFileHandler.cs">
|
||||
|
|
|
|||
|
|
@ -3,9 +3,11 @@ using NUnit.Framework;
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace MatterControl.Tests
|
||||
{
|
||||
|
|
@ -22,7 +24,82 @@ namespace MatterControl.Tests
|
|||
#endif
|
||||
}
|
||||
|
||||
[Test, Category("ReleaseQuality")]
|
||||
[Test, Category("ReleaseQuality")]
|
||||
public void MatterControlKnownAssembliesAreOptimized()
|
||||
{
|
||||
// Rebuild at any time with rebuildDependencies() below
|
||||
string knownAssemblies = @"MatterHackers.VectorMath.dll
|
||||
AGG.dll
|
||||
PlatfromAbstract.dll
|
||||
MatterHackers.PolygonMesh.dll
|
||||
MatterHackers.Csg.dll
|
||||
clipper_library.dll
|
||||
MatterHackers.Agg.UI.dll
|
||||
Tesselate.dll
|
||||
MatterHackers.DataConverters2D.dll
|
||||
MatterHackers.RenderOpenGl.dll
|
||||
RayTracer.dll
|
||||
MatterHackers.DataConverters3D.dll
|
||||
MatterHackers.Localizations.dll
|
||||
MatterHackers.OpenGL.UI.dll
|
||||
agg_platform_win32.dll
|
||||
WindowsFileDialogs.dll
|
||||
Community.CsharpSqlite.dll
|
||||
MatterHackers.SerialPortCommunication.dll
|
||||
MatterHackers.MatterControl.Pulgins.dll
|
||||
MatterHackers.Agg.ImageProcessing.dll
|
||||
MatterHackers.MarchingSquares.dll
|
||||
GuiAutomation.dll
|
||||
../../../../bin/Release/MatterControlAuth.dll
|
||||
../../../../bin/Release/PictureCreator.dll
|
||||
../../../../bin/Release/PrintNotifications.dll
|
||||
../../../../bin/Release/CloudServices.dll
|
||||
../../../../bin/Release/X3GDriver.dll
|
||||
../../../../bin/Release/Mono.Nat.dll
|
||||
../../../../bin/Release/BrailBuilder.dll
|
||||
TextCreator.dll";
|
||||
|
||||
foreach (string assemblyName in knownAssemblies.Split('\n').Select(s => s.Trim()))
|
||||
{
|
||||
var assemblyPath = Path.GetFullPath(assemblyName);
|
||||
if (!File.Exists(assemblyPath))
|
||||
{
|
||||
Console.WriteLine("Skipping missing file: " + assemblyPath);
|
||||
continue;
|
||||
}
|
||||
|
||||
var assembly = Assembly.LoadFrom(assemblyPath);
|
||||
|
||||
#if (!DEBUG)
|
||||
IsAssemblyOptimized(assembly);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
private void rebuildDependencies()
|
||||
{
|
||||
// Update to point to resent buildagent results file
|
||||
var elem = XElement.Load(@"C:\Data\Sources\MatterHackers\BuildAndDeployment\MatterControl\build_sln.xml");
|
||||
var items = elem.Descendants().Where(e => e.Name == "target" && "CopyFilesToOutputDirectory" == (string)e.Attribute("name")).SelectMany(e => e.Elements("message").Select(e2 => e2.Value.TrimEnd('.')).Where(s => s.Contains("Copying") && s.Contains(".dll")));
|
||||
|
||||
var referencedItems = new List<string>();
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
var segments = System.Text.RegularExpressions.Regex.Split(item, "to \"");
|
||||
|
||||
var relativeAssemblyName = segments[1].TrimEnd('"');
|
||||
|
||||
var assemblyName = Path.GetFileName(relativeAssemblyName);
|
||||
|
||||
referencedItems.Add(assemblyName);
|
||||
}
|
||||
|
||||
Console.WriteLine(referencedItems);
|
||||
}
|
||||
|
||||
|
||||
[Test, Category("ReleaseQuality")]
|
||||
public void MatterControlDependenciesAreOptimized()
|
||||
{
|
||||
#if(!DEBUG)
|
||||
|
|
@ -40,12 +117,10 @@ namespace MatterControl.Tests
|
|||
IsAssemblyOptimized(assembly);
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine(string.Join("\r\n", matterControl.GetReferencedAssemblies().Select(a => a.Name).ToArray()));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
[Test, Category("ReleaseQuality")]
|
||||
[Test, Category("ReleaseQuality")]
|
||||
public void ClassicDebugComplicationFlagTests()
|
||||
{
|
||||
#if(!DEBUG)
|
||||
|
|
|
|||
13
Tests/MatterControl.nunit
Normal file
13
Tests/MatterControl.nunit
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<NUnitProject>
|
||||
<Settings activeconfig="Debug" processModel="Multiple" domainUsage="Multiple" />
|
||||
<Config name="Debug" binpathtype="Auto" runtimeFramework="v4.0.21006">
|
||||
<assembly path="..\Submodules\agg-sharp\Tests\Agg.Tests\bin\Debug\Agg.Tests.dll" />
|
||||
<assembly path="MatterControl.Tests\bin\Debug\MatterControl.Tests.dll" />
|
||||
<assembly path="..\Submodules\MatterSlice\Tests\MatterSlice.Tests\bin\Debug\MatterSlice.Tests.dll" />
|
||||
</Config>
|
||||
<Config name="Release" binpathtype="Auto" runtimeFramework="v4.0.21006">
|
||||
<assembly path="MatterControl.Tests\bin\Release\MatterControl.Tests.dll" />
|
||||
<assembly path="..\Submodules\agg-sharp\Tests\Agg.Tests\bin\Release\Agg.Tests.dll" />
|
||||
<assembly path="..\Submodules\MatterSlice\Tests\MatterSlice.Tests\bin\Release\MatterSlice.Tests.dll" />
|
||||
</Config>
|
||||
</NUnitProject>
|
||||
11
Tests/MatterControlAutomation.nunit
Normal file
11
Tests/MatterControlAutomation.nunit
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<NUnitProject>
|
||||
<Settings activeconfig="Debug" processModel="Multiple" domainUsage="Multiple" />
|
||||
<Config name="Debug" binpathtype="Auto" runtimeFramework="v4.0.21006">
|
||||
<assembly path="MatterControl.AutomationTests\bin\Debug\MatterControl.AutomationTests.dll" />
|
||||
<assembly path="..\..\CloudServicesPlugin\CloudServices.Tests\bin\Debug\CloudServices.Tests.dll" />
|
||||
</Config>
|
||||
<Config name="Release" binpathtype="Auto" runtimeFramework="v4.0.21006">
|
||||
<assembly path="MatterControl.AutomationTests\bin\Release\MatterControl.AutomationTests.dll" />
|
||||
<assembly path="..\..\CloudServicesPlugin\CloudServices.Tests\bin\Release\CloudServices.Tests.dll" />
|
||||
</Config>
|
||||
</NUnitProject>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<NUnitProject>
|
||||
<Settings activeconfig="Debug" processModel="Multiple" domainUsage="Multiple" />
|
||||
<Config name="Debug" binpathtype="Auto" runtimeFramework="v4.0.21006">
|
||||
<assembly path="..\MatterControl.AutomationTests\bin\Debug\MatterControl.AutomationTests.dll" />
|
||||
<assembly path="..\..\..\CloudServicesPlugin\CloudServices.Tests\bin\Debug\CloudServices.Tests.dll" />
|
||||
<assembly path="..\..\Submodules\agg-sharp\Tests\Agg.Tests\bin\Debug\Agg.Tests.dll" />
|
||||
<assembly path="..\MatterControl.Tests\bin\Debug\MatterControl.Tests.dll" />
|
||||
<assembly path="..\..\Submodules\MatterSlice\Tests\MatterSlice.Tests\bin\Debug\MatterSlice.Tests.dll" />
|
||||
</Config>
|
||||
<Config name="Release" binpathtype="Auto" runtimeFramework="v4.0.21006">
|
||||
<assembly path="..\MatterControl.AutomationTests\bin\Release\MatterControl.AutomationTests.dll" />
|
||||
<assembly path="..\..\..\CloudServicesPlugin\CloudServices.Tests\bin\Release\CloudServices.Tests.dll" />
|
||||
<assembly path="..\MatterControl.Tests\bin\Release\MatterControl.Tests.dll" />
|
||||
<assembly path="..\..\Submodules\agg-sharp\Tests\Agg.Tests\bin\Release\Agg.Tests.dll" />
|
||||
<assembly path="..\..\Submodules\MatterSlice\Tests\MatterSlice.Tests\bin\Release\MatterSlice.Tests.dll" />
|
||||
</Config>
|
||||
</NUnitProject>
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
|
||||
namespace TestRunner
|
||||
{
|
||||
class Program
|
||||
{
|
||||
private const string outputFileName = "result.xml";
|
||||
|
||||
// Currently just running from the bin folder
|
||||
private const string nunitPath = "NUnit-2.6.4";
|
||||
//private const string nunitPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "NUnit 2.6.3");
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Uri siteBaseUri = new Uri(args[0]);
|
||||
|
||||
//SimulateZipPost();
|
||||
//return;
|
||||
|
||||
if (File.Exists(outputFileName))
|
||||
{
|
||||
File.Delete(outputFileName);
|
||||
}
|
||||
|
||||
string binPath = null;
|
||||
|
||||
if (Directory.Exists(nunitPath))
|
||||
{
|
||||
binPath = Path.Combine(nunitPath, "bin\\nunit-console-x86.exe");
|
||||
}
|
||||
|
||||
// Run the unit tests
|
||||
if (!string.IsNullOrWhiteSpace(binPath) && File.Exists(binPath))
|
||||
{
|
||||
Process process = new Process();
|
||||
process.StartInfo.Arguments = string.Format(
|
||||
"{0} /xml:{1} /noshadow:true /config:Release", // /include:Agg.UI" // /include:MatterControl.UI2;Leveling"
|
||||
Path.GetFullPath("../../../MatterControl.nunit"),
|
||||
Path.GetFullPath(outputFileName));
|
||||
process.StartInfo.FileName = binPath;
|
||||
process.StartInfo.UseShellExecute = true;
|
||||
process.Start();
|
||||
|
||||
process.WaitForExit();
|
||||
}
|
||||
|
||||
// Post the results
|
||||
if (File.Exists(outputFileName))
|
||||
{
|
||||
var uri = new Uri(siteBaseUri, "testresults/create/");
|
||||
|
||||
// Post the file to the server
|
||||
var client = new WebClient();
|
||||
var bytes = client.UploadFile(uri, outputFileName);
|
||||
|
||||
string reportID = UTF8Encoding.UTF8.GetString(bytes);
|
||||
|
||||
// Launch the results
|
||||
Process.Start(new Uri(siteBaseUri, "testresults/details/" + reportID).AbsoluteUri);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SimulateZipPost(Uri baseUri)
|
||||
{
|
||||
var uri = new Uri(baseUri, "testresults/createfromzip/");
|
||||
|
||||
// Post the file to the server
|
||||
var client = new WebClient();
|
||||
var bytes = client.UploadFile(uri, @"E:\sources\websites\matterdata\TestResult4.zip");
|
||||
|
||||
string reportID = System.Text.UTF8Encoding.UTF8.GetString(bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("TestRunner")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("TestRunner")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("053add9e-15c5-4ca2-8669-88889e28ef32")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{33677C3F-145C-476B-A882-2A44179CDECB}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>TestRunner</RootNamespace>
|
||||
<AssemblyName>TestRunner</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestRunner", "TestRunner.csproj", "{33677C3F-145C-476B-A882-2A44179CDECB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{33677C3F-145C-476B-A882-2A44179CDECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{33677C3F-145C-476B-A882-2A44179CDECB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{33677C3F-145C-476B-A882-2A44179CDECB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{33677C3F-145C-476B-A882-2A44179CDECB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Loading…
Add table
Add a link
Reference in a new issue