From daf633643003969bd921c6081baee6628d3363ff Mon Sep 17 00:00:00 2001 From: Eric Vergnaud Date: Sun, 24 Jan 2021 16:50:50 +0800 Subject: [PATCH] add script --- .github/scripts/run-tests-dotnet.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 .github/scripts/run-tests-dotnet.sh diff --git a/.github/scripts/run-tests-dotnet.sh b/.github/scripts/run-tests-dotnet.sh new file mode 100755 index 000000000..de8c046e0 --- /dev/null +++ b/.github/scripts/run-tests-dotnet.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -euo pipefail + +# 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 build -c Release -f netstandard2.0 ../runtime/CSharp/Antlr4.csproj + +# call test + +if [ $GROUP == "LEXER" ]; then + mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LexerTests" -Dparallel=classes -DthreadCount=4 -Dtest=csharp.* test +elif [ $GROUP == "PARSER" ]; then + mvn -q -Dgroups="org.antlr.v4.test.runtime.category.ParserTests" -Dparallel=classes -DthreadCount=4 -Dtest=csharp.* test +elif [ $GROUP == "RECURSION" ]; then + mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LeftRecursionTests" -Dparallel=classes -DthreadCount=4 -Dtest=csharp.* test +else + mvn -q -Dparallel=methods -DthreadCount=4 -Dtest=csharp.* test +fi