Skip to content

Commit

Permalink
Update build script to handle engeine and console as well as framework
Browse files Browse the repository at this point in the history
  • Loading branch information
CharliePoole committed Sep 8, 2014
1 parent 3fb047c commit fec9abb
Show file tree
Hide file tree
Showing 13 changed files with 381 additions and 274 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ before_install:
- sudo apt-get update -qq -y
- sudo apt-get install mono-devel -qq -y

script: ./runbuild /p:Configuration=Release /p:Framework=$Framework "/t:DumpSettings;CleanAll;Build;Test"
script: ./build /p:Configuration=Release /p:Framework=$Framework "/t:DumpSettings;CleanAll;BuildFramework;TestFramework"

env:
matrix:
Expand Down
360 changes: 360 additions & 0 deletions NUnit.proj

Large diffs are not rendered by default.

252 changes: 0 additions & 252 deletions NUnitFramework.msbuild

This file was deleted.

2 changes: 2 additions & 0 deletions build
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
xbuild NUnit.proj "$@"
2 changes: 1 addition & 1 deletion runbuild.cmd → build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ setlocal
for %%a in (%*) do echo "%%a" | findstr /C:"mono">nul && set buildtool=xbuild.bat
if not defined buildtool for /f %%i in ('dir /b /ad /on "%windir%\Microsoft.NET\Framework\v*"') do @if exist "%windir%\Microsoft.NET\Framework\%%i\msbuild".exe set buildtool=%windir%\Microsoft.NET\Framework\%%i\msbuild.exe
if not defined buildtool (echo no MSBuild.exe or xbuild was found>&2 & exit /b 42)
if defined buildtool "%buildtool%" %~dp0NUnitFramework.msbuild %*
if defined buildtool "%buildtool%" %~dp0NUnit.proj %*
1 change: 1 addition & 0 deletions nunit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
BUILDING.txt = BUILDING.txt
LICENSE.txt = LICENSE.txt
NOTICES.txt = NOTICES.txt
NUnit.msbuild = NUnit.msbuild
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NUnitEngine", "NUnitEngine", "{31B45C4C-206F-4F31-9CC6-33BF11DFEE39}"
Expand Down
2 changes: 0 additions & 2 deletions runbuild

This file was deleted.

11 changes: 0 additions & 11 deletions src/NUnitConsole/NUnitConsoleTests.nunit

This file was deleted.

2 changes: 1 addition & 1 deletion src/NUnitConsole/nunit-console.tests/XmlOutputTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void InitializeTestEngineResult()
// Create a new DefaultAssemblyRunner, which is actually a framework class,
// because we can't use the one that's currently running this test.
var runner = new Runner(new Builder());
var assemblyPath = GetLocalPath("mock-assembly.dll");
var assemblyPath = GetLocalPath("mock-nunit-assembly.dll");
var settings = new Dictionary<string, object>();

// Make sure the runner loaded the mock assembly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ namespace NUnit.Engine.Internal.Tests
// Functional tests of the NUnitFrameworkDriver calling into the framework.
public class NUnitFrameworkDriverTests
{
private string MOCK_ASSEMBLY = "mock-assembly.dll";
private string MOCK_ASSEMBLY = "mock-nunit-assembly.dll";
private const string MISSING_FILE = "junk.dll";
private const string BAD_FILE = "mock-assembly.pdb";
private const string BAD_FILE = "mock-nunit-assembly.pdb";

private IDictionary<string, object> _settings = new Dictionary<string, object>();
private NUnitFrameworkDriver _driver;
Expand Down
3 changes: 2 additions & 1 deletion src/NUnitFramework/tests/Api/FrameworkControllerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ public class FrameworkControllerTests
{
#if NUNITLITE
private const string MOCK_ASSEMBLY = "mock-nunitlite-assembly.dll";
private const string BAD_FILE = "mock-nunitlite-assembly.pdb";
#else
private const string MOCK_ASSEMBLY = "mock-nunit-assembly.dll";
private const string BAD_FILE = "mock-nunit-assembly.pdb";
#endif
private const string MISSING_FILE = "junk.dll";
private const string BAD_FILE = "mock-assembly.pdb";
private const string EMPTY_FILTER = "<filter/>";

private IDictionary _settings = new Hashtable();
Expand Down
3 changes: 2 additions & 1 deletion src/NUnitFramework/tests/Api/TestAssemblyRunnerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ public class TestAssemblyRunnerTests
{
#if NUNITLITE
private const string MOCK_ASSEMBLY = "mock-nunitlite-assembly.dll";
private const string BAD_FILE = "mock-nunitlite-assembly.pdb";
private const string SLOW_TESTS = "slow-nunitlite-tests.dll";
#else
private const string MOCK_ASSEMBLY = "mock-nunit-assembly.dll";
private const string BAD_FILE = "mock-nunit-assembly.pdb";
private const string SLOW_TESTS = "slow-nunit-tests.dll";
#endif
private const string MISSING_FILE = "junk.dll";
private const string BAD_FILE = "mock-assembly.pdb";

private IDictionary _settings = new Hashtable();
private ITestAssemblyRunner _runner;
Expand Down
11 changes: 9 additions & 2 deletions src/NUnitFramework/tests/Internal/TestExecutionContextTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ***********************************************************************
// Copyright (c) 2010 Charlie Poole
// Copyright (c) 2014 Charlie Poole
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
Expand All @@ -22,6 +22,7 @@
// ***********************************************************************

using System;
using System.Reflection;
using System.Threading;
using System.Globalization;
using NUnit.Framework;
Expand Down Expand Up @@ -370,7 +371,13 @@ public void ExecutionStatusIsPromulgatedAcrossBranches()
[Test]
public void CanCreateObjectInAppDomain()
{
var domain = AppDomain.CreateDomain("TestCanCreateAppDomain");
AppDomain domain = AppDomain.CreateDomain(
"TestCanCreateAppDomain",
AppDomain.CurrentDomain.Evidence,
AssemblyHelper.GetDirectoryName(Assembly.GetExecutingAssembly()),
null,
false);

var obj = domain.CreateInstanceAndUnwrap("nunit.framework.tests", "NUnit.Framework.Internal.TestExecutionContextTests+TestClass");

Assert.NotNull(obj);
Expand Down

0 comments on commit fec9abb

Please sign in to comment.