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

Side by Side Diff: visual_studio/NativeClientVSAddIn/UnitTests/CompileParallelTest.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;
11 using NaCl.Build.CPPTasks; 11 using NaCl.Build.CPPTasks;
12 using NativeClientVSAddIn; 12 using NativeClientVSAddIn;
13 13
14 namespace UnitTests 14 namespace UnitTests
15 { 15 {
16 [TestClass] 16 [TestClass]
17 public class CompileParallelTest : BaseCompileTest 17 public class CompileParallelTest : BaseCompileTest
18 { 18 {
19 private static string SolutionBaseName_ = "CompileParallelTest"; 19 private static string SolutionBaseName_ = "CompileParallelTest";
20 20
21 [ClassInitialize] 21 [ClassInitialize]
22 public new static void ClassSetUp(TestContext testContext) 22 public static void ClassSetUp(TestContext testContext)
23 { 23 {
24 BaseCompileTest.ClassSetUp(testContext, SolutionBaseName_); 24 BaseCompileTest.ClassSetUp(testContext, SolutionBaseName_);
25 } 25 }
26 26
27 /// <summary> 27 /// <summary>
28 /// This is run after each test to clean up things created in TestSetup( ). 28 /// This is run after each test to clean up things created in TestSetup( ).
29 /// </summary> 29 /// </summary>
30 [TestCleanup] 30 [TestCleanup]
31 public void ClassTearDown() 31 public void ClassTearDown()
32 { 32 {
33 TestUtilities.CleanUpVisualStudioInstance(dte_); 33 TestUtilities.CleanUpVisualStudioInstance(dte_);
34 } 34 }
35 35
36 /// <summary> 36 /// <summary>
37 /// Test that parallel compilation works. 37 /// Test that parallel compilation works.
38 /// </summary> 38 /// </summary>
39 [TestMethod] 39 [TestMethod]
40 public void CheckParallelCompile() 40 public void CheckParallelCompile()
41 { 41 {
42 string platform = Strings.NaCl64PlatformName; 42 string platform = Strings.NaCl64PlatformName;
43 dte_.Solution.Open(SolutionName_); 43 dte_.Solution.Open(SolutionName_);
44 Project project = dte_.Solution.Projects.Item(TestUtilities.NaClProj ectUniqueName); 44 Project project = dte_.Solution.Projects.Item(TestUtilities.NaClProj ectUniqueName);
45 45
46 // Add property sheet that enables multiprocessing 46 // Add property sheet that enables multiprocessing
47 VCConfiguration config; 47 VCConfiguration config;
48 IVCRulePropertyStorage rule;
49 config = TestUtilities.GetVCConfiguration(project, "Debug", platform ); 48 config = TestUtilities.GetVCConfiguration(project, "Debug", platform );
50 config.AddPropertySheet("multiprocess.props"); 49 config.AddPropertySheet("multiprocess.props");
51 config = TestUtilities.GetVCConfiguration(project, "Release", platfo rm); 50 config = TestUtilities.GetVCConfiguration(project, "Release", platfo rm);
52 config.AddPropertySheet("multiprocess.props"); 51 config.AddPropertySheet("multiprocess.props");
53 52
54 // Add a second file 53 // Add a second file
55 project.ProjectItems.AddFromFile("test_file.cpp"); 54 project.ProjectItems.AddFromFile("test_file.cpp");
56 55
57 dte_.Solution.Close(true); 56 dte_.Solution.Close(true);
58 57
59 CheckCompile(platform, false); 58 CheckCompile(platform, false);
60 } 59 }
61 } 60 }
62 } 61 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698