2017-01-25 08:24:36 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-11-16 01:23:17 +08:00
|
|
|
set -euo pipefail
|
|
|
|
|
2020-12-28 21:06:19 +08:00
|
|
|
export PATH=$PATH:/Users/travis/.dotnet
|
|
|
|
|
2017-04-28 23:18:36 +08:00
|
|
|
# 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
|
|
|
|
|
2021-02-02 09:51:41 +08:00
|
|
|
dotnet build -c Release -f netstandard2.0 ../runtime/CSharp/src/Antlr4.csproj
|
2017-04-28 23:18:36 +08:00
|
|
|
|
|
|
|
# call test
|
|
|
|
|
2017-06-28 22:18:19 +08:00
|
|
|
if [ $GROUP == "LEXER" ]; then
|
2020-12-28 21:06:19 +08:00
|
|
|
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LexerTests" -Dparallel=classes -DthreadCount=4 -Dtest=csharp.* test
|
2017-06-28 22:18:19 +08:00
|
|
|
elif [ $GROUP == "PARSER" ]; then
|
2020-12-28 21:06:19 +08:00
|
|
|
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.ParserTests" -Dparallel=classes -DthreadCount=4 -Dtest=csharp.* test
|
2017-06-28 22:18:19 +08:00
|
|
|
elif [ $GROUP == "RECURSION" ]; then
|
2020-12-28 21:06:19 +08:00
|
|
|
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LeftRecursionTests" -Dparallel=classes -DthreadCount=4 -Dtest=csharp.* test
|
2017-06-28 22:18:19 +08:00
|
|
|
else
|
2020-12-28 21:06:19 +08:00
|
|
|
mvn -q -Dparallel=methods -DthreadCount=4 -Dtest=csharp.* test
|
2017-06-28 22:18:19 +08:00
|
|
|
fi
|