From 5c5b85b6761000f16b14ef0177d56f07d809e22b Mon Sep 17 00:00:00 2001 From: Manfred Endres <2523575+Larusso@users.noreply.github.com> Date: Wed, 9 May 2018 12:47:45 +0000 Subject: [PATCH] Activate test task feature for 2018.1 (#42) * Activate test task feature for 2018.1 Description =========== Unity released the first final version of unity `2018.1`. This change enables the test task feature for all unity 2017 versions and the first 2018.1 release. Changes ======= ![CHANGE] `Test` task unity version restriction ![CHANGE] tests to check for changed version restrictions * Reset REDIRECT_STDOUT_ENV_VAR to fix tests --- .../groovy/wooga/gradle/unity/tasks/Test.groovy | 3 ++- .../groovy/wooga/gradle/unity/tasks/TestSpec.groovy | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/groovy/wooga/gradle/unity/tasks/Test.groovy b/src/main/groovy/wooga/gradle/unity/tasks/Test.groovy index 056904b5..99cd41d2 100644 --- a/src/main/groovy/wooga/gradle/unity/tasks/Test.groovy +++ b/src/main/groovy/wooga/gradle/unity/tasks/Test.groovy @@ -164,7 +164,8 @@ class Test extends AbstractUnityProjectTask implements Reporting buildTestArguments(DefaultArtifactVersion unityVersion) { def testArgs = [] if ((unityVersion.majorVersion == 5 && unityVersion.minorVersion == 6) - || (unityVersion.majorVersion == 2017 && unityVersion.minorVersion == 1)) { + || unityVersion.majorVersion == 2017 + || (unityVersion.majorVersion == 2018 && unityVersion.minorVersion == 1)) { logger.info("activate unittests with ${BatchModeFlags.RUN_TESTS} switch") //new unit test runner does not work in batchmode diff --git a/src/test/groovy/wooga/gradle/unity/tasks/TestSpec.groovy b/src/test/groovy/wooga/gradle/unity/tasks/TestSpec.groovy index 62813ed1..86c7124e 100644 --- a/src/test/groovy/wooga/gradle/unity/tasks/TestSpec.groovy +++ b/src/test/groovy/wooga/gradle/unity/tasks/TestSpec.groovy @@ -120,6 +120,7 @@ class TestSpec extends ProjectSpec { PosixFilePermission.GROUP_EXECUTE, ].toSet()) environmentVariables.set("WMIC_PATH", wmic.path) + environmentVariables.set("REDIRECT_STDOUT_ENV_VAR", "false") expect: Test.retrieveUnityVersion(project, unityPath, "5.5.0").toString() == version @@ -131,12 +132,20 @@ class TestSpec extends ProjectSpec { "MAC OS X" | "5.5.0" | "-runEditorTests" "MAC OS X" | "5.6.0" | "-runTests" "MAC OS X" | "2017.1.0" | "-runTests" - "MAC OS X" | "2017.2.0" | "" + "MAC OS X" | "2017.2.0" | "-runTests" + "MAC OS X" | "2017.3.0" | "-runTests" + "MAC OS X" | "2017.4.0" | "-runTests" + "MAC OS X" | "2018.1.0" | "-runTests" + "MAC OS X" | "2018.2.0" | "" "WINDOWS" | "5.4.0" | "" "WINDOWS" | "5.5.0" | "-runEditorTests" "WINDOWS" | "5.6.0" | "-runTests" "WINDOWS" | "2017.1.0" | "-runTests" - "WINDOWS" | "2017.2.0" | "" + "WINDOWS" | "2017.2.0" | "-runTests" + "WINDOWS" | "2017.3.0" | "-runTests" + "WINDOWS" | "2017.4.0" | "-runTests" + "WINDOWS" | "2018.1.0" | "-runTests" + "WINDOWS" | "2018.2.0" | "" } }