Skip to content

Commit 153f6dd

Browse files
authored
Merge pull request #9 from artstorm/unity-test-filter
Add support for Unity testFilter option
2 parents 61b11a1 + c47a254 commit 153f6dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vars/unityTestRunner.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
* @param useCodeCoverage Determine if a code coverage report should be generated.
1212
* @param assemblyFilters Filters which assemblies to include/exclude in code coverage report.
1313
* @param pathFilters Filters which paths that should be included or excluded in the coverage report.
14+
* @param testFilter Add a filter of which tests to run.
1415
*/
15-
def call(String mode, String platform, Boolean useCodeCoverage = false, String assemblyFilters = '', String pathFilters = '') {
16+
def call(String mode, String platform, Boolean useCodeCoverage = false, String assemblyFilters = '', String pathFilters = '', String testFilter = '') {
1617
// Setup code coverage parameters to use with the testrunner, if `useCodeCoverage` is enabled.
1718
// https://docs.unity3d.com/Packages/com.unity.testtools.codecoverage@1.1/manual/CoverageBatchmode.html
1819
String codeCoverage = ''
@@ -38,6 +39,7 @@ def call(String mode, String platform, Boolean useCodeCoverage = false, String a
3839
-forgetProjectPath \
3940
-buildTarget ${platform} \
4041
-testPlatform ${mode} \
42+
-testFilter "${testFilter}" \
4143
-testResults Reports/Tests/${platform}-${mode}.xml \
4244
-logFile Logs/tests-${platform}-${mode}.log \
4345
${codeCoverage}

0 commit comments

Comments
 (0)