antlr/.travis/run-tests-dotnet.sh

23 lines
876 B
Bash
Raw Normal View History

2017-01-25 08:24:36 +08:00
#!/bin/bash
set -euo pipefail
export PATH=$PATH:/Users/travis/.dotnet
# 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
Restructure C# runtime and fix Issue #2693 (#3057) * Fixes for https://github.com/antlr/antlr4/issues/2693 * Adding script for comparing Java and C# profile output. * Update lexer grammar. Tightening up the grammar rules. Still Java9. * Tighten up grammar. * Adding in new base classes for C# runtime tests for profiling. * Complete test for Profile = true. Update ProfileDescriptor to now parse and output profile. The grammar is asm8080 from grammars-v4, tightened up. The input is the example provided there, truncated to included fewer lines as that causes a null-ptr crash with the older runtime. I verified by modifying the .csproj in /tmp. * Restructuring the Antlr C# runtime so that it is consistent with all other runtimes, a source directory (now antlr4/runtime/CSharp/src), and a test directory (antlr4/runtime/CSharp). In the test area, I added a test for profiling in issue-2593. This test requires the Antlr tool and Antlr C# tool to be build. The path is assumed in a relative path to the test, ../../../../tool/target/antlr4-*-SNAPSHOT-complete.jar, with globbing performed. The test simply checks the return result, output not important. There are no changes to the runtime C# source files other than placing them under src/. Several other build files were changed to reflect the new location of the Antlr C# runtime. I updated the instructions for users on how to build the runtime, including information on checking the environment--now explicitly specified here so people know what to install!
2021-02-02 09:51:41 +08:00
dotnet build -c Release -f netstandard2.0 ../runtime/CSharp/src/Antlr4.csproj
# call test
2017-06-28 22:18:19 +08:00
if [ $GROUP == "LEXER" ]; then
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
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
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
mvn -q -Dparallel=methods -DthreadCount=4 -Dtest=csharp.* test
2017-06-28 22:18:19 +08:00
fi