Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: visual_studio/NativeClientVSAddIn/UnitTests/BaseCompileTest.cs

Issue 14122017: [VS Addin] Add visual studio 2012 support (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 using System; 4 using System;
5 using System.Text; 5 using System.Text;
6 using System.Collections.Generic; 6 using System.Collections.Generic;
7 using EnvDTE; 7 using EnvDTE;
8 using EnvDTE80; 8 using EnvDTE80;
9 using Microsoft.VisualStudio.TestTools.UnitTesting; 9 using Microsoft.VisualStudio.TestTools.UnitTesting;
10 using Microsoft.VisualStudio.VCProjectEngine; 10 using Microsoft.VisualStudio.VCProjectEngine;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 compileOutput.Contains("MS-DOS style path detected", ignoreCase) , 96 compileOutput.Contains("MS-DOS style path detected", ignoreCase) ,
97 string.Format(cygwinWarningFormat, platformName, configName)); 97 string.Format(cygwinWarningFormat, platformName, configName));
98 } 98 }
99 99
100 /// <summary> 100 /// <summary>
101 /// Set the type of the project: Executable, DynamicLibrary, StaticLibra ry 101 /// Set the type of the project: Executable, DynamicLibrary, StaticLibra ry
102 /// </summary> 102 /// </summary>
103 private void SetProjectType(string projectType, string platformName) 103 private void SetProjectType(string projectType, string platformName)
104 { 104 {
105 Project project = dte_.Solution.Projects.Item(TestUtilities.NaClProj ectUniqueName); 105 Project project = dte_.Solution.Projects.Item(TestUtilities.NaClProj ectUniqueName);
106 VCConfiguration config; 106 TestUtilities.SetProjectType(project, projectType, platformName);
107 IVCRulePropertyStorage rule;
108
109 config = TestUtilities.GetVCConfiguration(project, "Debug", platform Name);
110 rule = config.Rules.Item("ConfigurationGeneral");
111 rule.SetPropertyValue("ConfigurationType", projectType);
112
113 config = TestUtilities.GetVCConfiguration(project, "Release", platfo rmName);
114 rule = config.Rules.Item("ConfigurationGeneral");
115 rule.SetPropertyValue("ConfigurationType", projectType);
116 } 107 }
117 108
118 protected void CheckCompile(string platform, bool dll) 109 protected void CheckCompile(string platform, bool dll)
119 { 110 {
120 dte_.Solution.Open(SolutionName_); 111 dte_.Solution.Open(SolutionName_);
121 SetProjectType("Executable", platform); 112 SetProjectType("Executable", platform);
122 TryCompile("Debug", platform); 113 TryCompile("Debug", platform);
123 TryCompile("Release", platform); 114 TryCompile("Release", platform);
124 SetProjectType("StaticLibrary", platform); 115 SetProjectType("StaticLibrary", platform);
125 TryCompile("Debug", platform); 116 TryCompile("Debug", platform);
126 TryCompile("Release", platform); 117 TryCompile("Release", platform);
127 if (dll) 118 if (dll)
128 { 119 {
129 SetProjectType("DynamicLibrary", platform); 120 SetProjectType("DynamicLibrary", platform);
130 TryCompile("Debug", platform); 121 TryCompile("Debug", platform);
131 TryCompile("Release", platform); 122 TryCompile("Release", platform);
132 } 123 }
133 dte_.Solution.Close(true); 124 dte_.Solution.Close(true);
134 } 125 }
135 } 126 }
136 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698