From e94b3acaed060f5bb936f0ee8106283a57008016 Mon Sep 17 00:00:00 2001 From: Dong Xie Date: Fri, 28 Apr 2017 16:18:36 +0100 Subject: [PATCH] [dotnet] fix again for the test speed up --- .travis/run-tests-dotnet.sh | 8 ++++++++ .../org/antlr/v4/test/runtime/csharp/BaseCSharpTest.java | 8 ++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.travis/run-tests-dotnet.sh b/.travis/run-tests-dotnet.sh index 9eddc25a3..83fbe6d58 100755 --- a/.travis/run-tests-dotnet.sh +++ b/.travis/run-tests-dotnet.sh @@ -1,4 +1,12 @@ #!/bin/bash +# we need to build the runtime before test run, since we used "--no-dependencies" +# when we call dotnet cli for restore and build, in order to speed up + +dotnet restore ../runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.dotnet.csproj +dotnet build -c Release ../runtime/CSharp/runtime/CSharp/Antlr4.Runtime/Antlr4.Runtime.dotnet.csproj + +# call test + mvn -q -Dparallel=classes -DthreadCount=4 -Dtest=csharp.* -Dantlr-csharp-netstandard=true test diff --git a/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseCSharpTest.java b/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseCSharpTest.java index 9def788e3..6eefa6262 100644 --- a/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseCSharpTest.java +++ b/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseCSharpTest.java @@ -495,10 +495,6 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest File runtimeProjFile = new File(runtimeProj.getFile()); String runtimeProjPath = runtimeProjFile.getPath(); - // check if runtime is built already - File dll = new File(runtimeProjFile.getParent() + "/bin/Release/netstandard1.3/Antlr4.Runtime.Core.dll"); - String cliSwitch = (dll.exists() ? "--no-dependencies" : ""); - // add Runtime project reference String dotnetcli = locateTool("dotnet"); String[] args = new String[] { @@ -515,7 +511,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest dotnetcli, "restore", "Antlr4.Test.dotnet.csproj", - cliSwitch + "--no-dependencies" }; success = runProcess(args, tmpdir); @@ -526,7 +522,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest "Antlr4.Test.dotnet.csproj", "-c", "Release", - cliSwitch + "--no-dependencies" }; success = runProcess(args, tmpdir); }