Skip to content

Commit 3be147e

Browse files
authored
Merge pull request #131 from jwittner/dev/unitTests
Support the Unity tests flags
2 parents 4813b3e + 328dc36 commit 3be147e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@ function Get-UnityProjectInstance {
742742
What serial should be used by Unity for activation? Implies BatchMode and Quit if they're not supplied by the User.
743743
.PARAMETER ReturnLicense
744744
Unity should return the current license it's been activated with. Implies Quit if not supplied by the User.
745+
.PARAMETER EditorTestsCategories
746+
Filter tests by category names.
747+
.PARAMETER EditorTestsFilter
748+
Filter tests by test names.
749+
.PARAMETER EditorTestsResultFile
750+
Where to put the results? Unity states, "If the path is a folder, the command line uses a default file name. If not specified, it places the results in the project’s root folder."
751+
.PARAMETER RunEditorTests
752+
Should Unity run the editor tests? Unity states, "[...]it’s good practice to run it with batchmode argument. quit is not required, because the Editor automatically closes down after the run is finished."
745753
.PARAMETER BatchMode
746754
Should the Unity Editor start in batch mode?
747755
.PARAMETER Quit
@@ -808,6 +816,14 @@ function Start-UnityEditor {
808816
[parameter(Mandatory = $false)]
809817
[switch]$ForceFree,
810818
[parameter(Mandatory = $false)]
819+
[string[]]$EditorTestsCategory,
820+
[parameter(Mandatory = $false)]
821+
[string[]]$EditorTestsFilter,
822+
[parameter(Mandatory = $false)]
823+
[string]$EditorTestsResultFile,
824+
[parameter(Mandatory = $false)]
825+
[switch]$RunEditorTests,
826+
[parameter(Mandatory = $false)]
811827
[switch]$BatchMode,
812828
[parameter(Mandatory = $false)]
813829
[switch]$Quit,
@@ -899,6 +915,10 @@ function Start-UnityEditor {
899915
if ( $ExportPackage ) { $sharedArgs += "-exportPackage", "$ExportPackage" }
900916
if ( $ImportPackage ) { $sharedArgs += "-importPackage", "$ImportPackage" }
901917
if ( $Credential ) { $sharedArgs += '-username', $Credential.UserName }
918+
if ( $EditorTestsCategory ) { $sharedArgs += '-editorTestsCategories', ($EditorTestsCategory -join ',') }
919+
if ( $EditorTestsFilter ) { $sharedArgs += '-editorTestsFilter', ($EditorTestsFilter -join ',') }
920+
if ( $EditorTestsResultFile ) { $sharedArgs += '-editorTestsResultFile', $EditorTestsResultFile }
921+
if ( $RunEditorTests ) { $sharedArgs += '-runEditorTests' }
902922
if ( $ForceFree) { $sharedArgs += '-force-free' }
903923

904924
$instanceArgs = @()

0 commit comments

Comments
 (0)