From e9faad822457c178add178938980277d9988e70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pi=C3=ABt=20Delport?= Date: Mon, 28 Dec 2015 16:06:07 +0200 Subject: [PATCH 1/5] Update fetch scripts to download NUnit 3.0.1, and adjust paths Update Makefile to look for nunit3-console.exe --- Makefile | 2 +- thirdparty/fetch-thirdparty-deps.ps1 | 2 +- thirdparty/fetch-thirdparty-deps.sh | 18 ++++++++---------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index f59d70d6a8..91dc8d61bc 100644 --- a/Makefile +++ b/Makefile @@ -228,7 +228,7 @@ check: utility mods @echo "Checking for code style violations in OpenRA.Test..." @mono --debug OpenRA.Utility.exe ra --check-code-style OpenRA.Test -NUNIT_CONSOLE := $(shell test -f thirdparty/download/nunit-console.exe && echo mono thirdparty/download/nunit-console.exe || \ +NUNIT_CONSOLE := $(shell test -f thirdparty/download/nunit3-console.exe && echo mono thirdparty/download/nunit3-console.exe || \ which nunit2-console 2>/dev/null || which nunit3-console 2>/dev/null || which nunit-console 2>/dev/null) nunit: test_dll @echo diff --git a/thirdparty/fetch-thirdparty-deps.ps1 b/thirdparty/fetch-thirdparty-deps.ps1 index 0c096f276f..6256b88b4a 100644 --- a/thirdparty/fetch-thirdparty-deps.ps1 +++ b/thirdparty/fetch-thirdparty-deps.ps1 @@ -62,7 +62,7 @@ if (!(Test-Path "SharpFont.dll")) if (!(Test-Path "nunit.framework.dll")) { echo "Fetching NUnit from NuGet." - ./nuget.exe install NUnit -Version 2.6.4 -ExcludeVersion + ./nuget.exe install NUnit -Version 3.0.1 -ExcludeVersion cp NUnit/lib/nunit.framework* . rmdir NUnit -Recurse } diff --git a/thirdparty/fetch-thirdparty-deps.sh b/thirdparty/fetch-thirdparty-deps.sh index 6805d21ee8..ef3aaf11e6 100755 --- a/thirdparty/fetch-thirdparty-deps.sh +++ b/thirdparty/fetch-thirdparty-deps.sh @@ -73,19 +73,17 @@ fi if [ ! -f nunit.framework.dll ]; then echo "Fetching NUnit from NuGet" - get NUnit 2.6.4 - cp ./NUnit/lib/nunit.framework* . + get NUnit 3.0.1 + cp ./NUnit/lib/net40/nunit.framework* . rm -rf NUnit fi -if [ ! -f nunit-console.exe ]; then - echo "Fetching NUnit.Runners from NuGet" - get NUnit.Runners 2.6.4 - cp ./NUnit.Runners/tools/nunit-console.exe . - chmod +x nunit-console.exe - cp ./NUnit.Runners/tools/nunit-console.exe.config . - cp -R ./NUnit.Runners/tools/lib . - rm -rf NUnit.Runners +if [ ! -f nunit3-console.exe ]; then + echo "Fetching NUnit.Console from NuGet" + get NUnit.Console 3.0.1 + cp -R ./NUnit.Console/tools/* . + chmod +x nunit3-console.exe + rm -rf NUnit.Console fi if [ ! -f Mono.Nat.dll ]; then From d682522b78f0c54e4cb732ed7348522d8ea63638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pi=C3=ABt=20Delport?= Date: Mon, 28 Dec 2015 16:20:30 +0200 Subject: [PATCH 2/5] List myself in AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 9e13f4d0fc..318607c87a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -103,6 +103,7 @@ Also thanks to: * Paul Dovydaitis (pdovy) * Pavlos Touboulidis (pav) * Pizzaoverhead + * Piƫt Delport (pjdelport) * Psydev * Raymond Bedrossian (Squiggles211) * Raymond Martineau (mart0258) From 7f51a69eb56a6431866e2942124e622cdf870add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pi=C3=ABt=20Delport?= Date: Mon, 28 Dec 2015 16:27:01 +0200 Subject: [PATCH 3/5] Update NUnit lib path for the ps1 script too --- thirdparty/fetch-thirdparty-deps.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thirdparty/fetch-thirdparty-deps.ps1 b/thirdparty/fetch-thirdparty-deps.ps1 index 6256b88b4a..f47387b3ad 100644 --- a/thirdparty/fetch-thirdparty-deps.ps1 +++ b/thirdparty/fetch-thirdparty-deps.ps1 @@ -63,7 +63,7 @@ if (!(Test-Path "nunit.framework.dll")) { echo "Fetching NUnit from NuGet." ./nuget.exe install NUnit -Version 3.0.1 -ExcludeVersion - cp NUnit/lib/nunit.framework* . + cp NUnit/lib/net40/nunit.framework* . rmdir NUnit -Recurse } From 8399ec721ea7d3fd8c182953e1459faab04178e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pi=C3=ABt=20Delport?= Date: Mon, 28 Dec 2015 16:49:38 +0200 Subject: [PATCH 4/5] Update AppVeyor config for NUnit 3.x This follows the instructions at: https://www.appveyor.com/docs/running-tests#nunit-3-x and should enable reporting test results to AppVeyor, too. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9452f805ce..083f6b6494 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,7 +50,7 @@ before_test: } test_script: - - nunit-console-x86.exe OpenRA.Test.dll + - nunit3-console OpenRA.Test.dll --result=myresults.xml;format=AppVeyor after_test: - choco install pandoc -y From e7a5be0c1b92c4c2bf158654ef5cfcc83909c2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pi=C3=ABt=20Delport?= Date: Tue, 29 Dec 2015 19:47:41 +0200 Subject: [PATCH 5/5] Add --noresult to the "make nunit" invocation (requested by @obrakmann) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 91dc8d61bc..5cd246be81 100644 --- a/Makefile +++ b/Makefile @@ -243,7 +243,7 @@ nunit: test_dll echo 'NUnit version >= 2.6 required'>&2; \ exit 1; \ fi - @$(NUNIT_CONSOLE) $(test_dll_TARGET) + @$(NUNIT_CONSOLE) --noresult $(test_dll_TARGET) test: utility mods @echo