[commit] r2309 - in trunk: . Tests/GPyUnit Tests/GPyUnit/DsmlGeneratorTest Tests/GPyUnit/DsmlGeneratorTest/.nuget
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Aug 28 21:05:45 CDT 2013
Author: ksmyth
Date: Wed Aug 28 21:05:45 2013
New Revision: 2309
Log:
DsmlGenerator test: use NuGet package for MgaMeta dependency
Added:
trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/
trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.Config
trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.exe
trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.targets
trunk/Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.sln
trunk/Tests/GPyUnit/DsmlGeneratorTest/app.config
trunk/Tests/GPyUnit/DsmlGeneratorTest/packages.config
Modified:
trunk/.gitignore
trunk/Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.csproj
trunk/Tests/GPyUnit/test_DsmlGenerator.py
Modified: trunk/.gitignore
==============================================================================
--- trunk/.gitignore Wed Aug 28 15:48:08 2013 (r2308)
+++ trunk/.gitignore Wed Aug 28 21:05:45 2013 (r2309)
@@ -407,3 +407,4 @@
Paradigms/MetaGME/ISIS.GME.Dsml.MetaGME.xml
Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.sln
SDK/DotNet/DsmlGenerator/.nuget/NuGet.exe
+Tests/GPyUnit/DsmlGeneratorTest/packages/
Added: trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.Config
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.Config Wed Aug 28 21:05:45 2013 (r2309)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <solution>
+ <add key="disableSourceControlIntegration" value="true" />
+ </solution>
+</configuration>
\ No newline at end of file
Added: trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.exe
==============================================================================
Binary files /dev/null 00:00:00 1970 (empty, because file is newly added) and trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.exe Wed Aug 28 21:05:45 2013 (r2309) differ
Added: trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.targets
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/GPyUnit/DsmlGeneratorTest/.nuget/NuGet.targets Wed Aug 28 21:05:45 2013 (r2309)
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
+
+ <!-- Enable the restore command to run before builds -->
+ <RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
+
+ <!-- Property that enables building a package from a project -->
+ <BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
+
+ <!-- Determines if package restore consent is required to restore packages -->
+ <RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
+
+ <!-- Download NuGet.exe if it does not already exist -->
+ <DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
+ </PropertyGroup>
+
+ <ItemGroup Condition=" '$(PackageSources)' == '' ">
+ <!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
+ <!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
+ <!--
+ <PackageSource Include="https://www.nuget.org/api/v2/" />
+ <PackageSource Include="https://my-nuget-source/nuget/" />
+ -->
+ </ItemGroup>
+
+ <PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
+ <!-- Windows specific commands -->
+ <NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
+ <PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
+ </PropertyGroup>
+
+ <PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
+ <!-- We need to launch nuget.exe with the mono command if we're not on windows -->
+ <NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
+ <PackagesConfig>packages.config</PackagesConfig>
+ </PropertyGroup>
+
+ <PropertyGroup>
+ <!-- NuGet command -->
+ <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
+ <PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
+
+ <NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
+ <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
+
+ <PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
+
+ <RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
+ <NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
+
+ <PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
+ <PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
+
+ <!-- Commands -->
+ <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
+ <BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
+
+ <!-- We need to ensure packages are restored prior to assembly resolve -->
+ <BuildDependsOn Condition="$(RestorePackages) == 'true'">
+ RestorePackages;
+ $(BuildDependsOn);
+ </BuildDependsOn>
+
+ <!-- Make the build depend on restore packages -->
+ <BuildDependsOn Condition="$(BuildPackage) == 'true'">
+ $(BuildDependsOn);
+ BuildPackage;
+ </BuildDependsOn>
+ </PropertyGroup>
+
+ <Target Name="CheckPrerequisites">
+ <!-- Raise an error if we're unable to locate nuget.exe -->
+ <Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
+ <!--
+ Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
+ This effectively acts as a lock that makes sure that the download operation will only happen once and all
+ parallel builds will have to wait for it to complete.
+ -->
+ <MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
+ </Target>
+
+ <Target Name="_DownloadNuGet">
+ <DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
+ </Target>
+
+ <Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(RestoreCommand)"
+ Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
+
+ <Exec Command="$(RestoreCommand)"
+ LogStandardErrorAsError="true"
+ Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
+ </Target>
+
+ <Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
+ <Exec Command="$(BuildCommand)"
+ Condition=" '$(OS)' != 'Windows_NT' " />
+
+ <Exec Command="$(BuildCommand)"
+ LogStandardErrorAsError="true"
+ Condition=" '$(OS)' == 'Windows_NT' " />
+ </Target>
+
+ <UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+ <ParameterGroup>
+ <OutputFilename ParameterType="System.String" Required="true" />
+ </ParameterGroup>
+ <Task>
+ <Reference Include="System.Core" />
+ <Using Namespace="System" />
+ <Using Namespace="System.IO" />
+ <Using Namespace="System.Net" />
+ <Using Namespace="Microsoft.Build.Framework" />
+ <Using Namespace="Microsoft.Build.Utilities" />
+ <Code Type="Fragment" Language="cs">
+ <![CDATA[
+ try {
+ OutputFilename = Path.GetFullPath(OutputFilename);
+
+ Log.LogMessage("Downloading latest version of NuGet.exe...");
+ WebClient webClient = new WebClient();
+ webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
+
+ return true;
+ }
+ catch (Exception ex) {
+ Log.LogErrorFromException(ex);
+ return false;
+ }
+ ]]>
+ </Code>
+ </Task>
+ </UsingTask>
+</Project>
\ No newline at end of file
Modified: trunk/Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.csproj
==============================================================================
--- trunk/Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.csproj Wed Aug 28 15:48:08 2013 (r2308)
+++ trunk/Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.csproj Wed Aug 28 21:05:45 2013 (r2309)
@@ -13,6 +13,8 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">.\</SolutionDir>
+ <RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -34,24 +36,38 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="GME, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
+ </Reference>
<Reference Include="GME.MGA, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e, processorArchitecture=MSIL">
- <EmbedInteropTypes>True</EmbedInteropTypes>
+ <SpecificVersion>False</SpecificVersion>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="GME.MGA.Core, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e, processorArchitecture=MSIL">
- <EmbedInteropTypes>True</EmbedInteropTypes>
+ <SpecificVersion>False</SpecificVersion>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="GME.MGA.Meta, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e, processorArchitecture=MSIL">
- <EmbedInteropTypes>True</EmbedInteropTypes>
+ <SpecificVersion>False</SpecificVersion>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
- <Reference Include="ISIS.GME.Common, Version=1.0.2.0, Culture=neutral, PublicKeyToken=1321e6b92842fe54, processorArchitecture=MSIL">
+ <Reference Include="GME.MGA.Parser, Version=1.1.0.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\SDK\DotNet\DsmlGenerator\ISIS.GME.Common\bin\Release\ISIS.GME.Common.dll</HintPath>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
+ </Reference>
+ <Reference Include="GME.Util, Version=1.0.1.0, Culture=neutral, PublicKeyToken=f240a760fe751c2e, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <EmbedInteropTypes>False</EmbedInteropTypes>
+ </Reference>
+ <Reference Include="ISIS.GME.Common, Version=1.0.4.0, Culture=neutral, PublicKeyToken=1321e6b92842fe54, processorArchitecture=MSIL">
+ <HintPath>packages\GME.DSMLGenerator.Runtime.1.0.10.0\lib\net40\ISIS.GME.Common.dll</HintPath>
</Reference>
<Reference Include="ISIS.GME.Dsml.BidirConnection">
<HintPath>..\ISIS.GME.Dsml.BidirConnection.dll</HintPath>
</Reference>
- <Reference Include="MgaMeta">
- <HintPath>..\..\..\SDK\DotNet\DsmlGenerator\MgaMeta\bin\Release\MgaMeta.dll</HintPath>
+ <Reference Include="MgaMeta, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1321e6b92842fe54, processorArchitecture=MSIL">
+ <HintPath>packages\GME.DSMLGenerator.Runtime.1.0.10.0\lib\net40\MgaMeta.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -65,7 +81,12 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ <None Include="packages.config" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.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">
Added: trunk/Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.sln
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/GPyUnit/DsmlGeneratorTest/DsmlGeneratorTest.sln Wed Aug 28 21:05:45 2013 (r2309)
@@ -0,0 +1,27 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DsmlGeneratorTest", "DsmlGeneratorTest.csproj", "{FC2EE6AB-4F38-4E0B-B2B7-54536E43F267}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{7028C65F-4AFA-43C0-9C06-221E9E20B4E5}"
+ ProjectSection(SolutionItems) = preProject
+ .nuget\NuGet.Config = .nuget\NuGet.Config
+ .nuget\NuGet.exe = .nuget\NuGet.exe
+ .nuget\NuGet.targets = .nuget\NuGet.targets
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x86 = Debug|x86
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FC2EE6AB-4F38-4E0B-B2B7-54536E43F267}.Debug|x86.ActiveCfg = Debug|x86
+ {FC2EE6AB-4F38-4E0B-B2B7-54536E43F267}.Debug|x86.Build.0 = Debug|x86
+ {FC2EE6AB-4F38-4E0B-B2B7-54536E43F267}.Release|x86.ActiveCfg = Release|x86
+ {FC2EE6AB-4F38-4E0B-B2B7-54536E43F267}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Added: trunk/Tests/GPyUnit/DsmlGeneratorTest/app.config
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/GPyUnit/DsmlGeneratorTest/app.config Wed Aug 28 21:05:45 2013 (r2309)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="GME.MGA" publicKeyToken="f240a760fe751c2e" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="GME.MGA.Meta" publicKeyToken="f240a760fe751c2e" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.0.1.0" newVersion="1.0.1.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
\ No newline at end of file
Added: trunk/Tests/GPyUnit/DsmlGeneratorTest/packages.config
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/Tests/GPyUnit/DsmlGeneratorTest/packages.config Wed Aug 28 21:05:45 2013 (r2309)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="GME.DSMLGenerator.Runtime" version="1.0.10.0" targetFramework="net40-Client" />
+ <package id="GME.PIAs" version="1.0.1.0" targetFramework="net40-Client" />
+</packages>
\ No newline at end of file
Modified: trunk/Tests/GPyUnit/test_DsmlGenerator.py
==============================================================================
--- trunk/Tests/GPyUnit/test_DsmlGenerator.py Wed Aug 28 15:48:08 2013 (r2308)
+++ trunk/Tests/GPyUnit/test_DsmlGenerator.py Wed Aug 28 21:05:45 2013 (r2309)
@@ -35,7 +35,7 @@
mga.Close()
import subprocess
- subprocess.check_call([r"c:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe", _adjacent_file(r"DsmlGeneratorTest\DsmlGeneratorTest.csproj")])
+ subprocess.check_call([r"c:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe", _adjacent_file(r"DsmlGeneratorTest\DsmlGeneratorTest.sln")])
subprocess.check_call([_adjacent_file(r"DsmlGeneratorTest\bin\Debug\DsmlGeneratorTest.exe"), self.connstr])
More information about the gme-commit
mailing list