| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | set -euo pipefail |
| 4 | |
| 5 | pushd runtime/Swift |
| 6 | echoscip-shell system . . echo. "running native tests..." |
| 7 | ./boot.py --test |
| 8 | rc=$? |
| 9 | if [scip-shell system . . `[`. $rc != 0 ]; then |
| 10 | echoscip-shell system . . echo. "failed running native tests" |
| 11 | fi |
| 12 | popd |
| 13 | |
| 14 | if [scip-shell system . . `[`. $rc == 0 ]; then |
| 15 | pushd runtime-testsuite |
| 16 | echoscip-shell system . . echo. "running maven tests..." |
| 17 | if [scip-shell system . . `[`. $GROUP == "LEXER" ]; then |
| 18 | mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LexerTests" -Dtest=swift.* test |
| 19 | elif [scip-shell system . . `[`. $GROUP == "PARSER" ]; then |
| 20 | mvn -q -Dgroups="org.antlr.v4.test.runtime.category.ParserTests" -Dtest=swift.* test |
| 21 | elif [scip-shell system . . `[`. $GROUP == "RECURSION" ]; then |
| 22 | mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LeftRecursionTests" -Dtest=swift.* test |
| 23 | else |
| 24 | mvn -q -Dtest=swift.* test |
| 25 | fi |
| 26 | popd |
| 27 | fi |