[dotnet] fix again for the test speed up

This commit is contained in:
Dong Xie 2017-04-28 16:18:36 +01:00
parent 5fffe4bb2e
commit e94b3acaed
2 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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);
}