diff --git a/dist/steps/run_tests.ps1 b/dist/steps/run_tests.ps1 index 41f7672..baacb64 100644 --- a/dist/steps/run_tests.ps1 +++ b/dist/steps/run_tests.ps1 @@ -111,16 +111,19 @@ foreach ( $platform in ${env:TEST_PLATFORMS}.Split(";") ) # Catch exit code $TEST_EXIT_CODE = $TEST_OUTPUT.ExitCode + # Print unity log output + Get-Content "$FULL_ARTIFACTS_PATH/$platform.log" + if ( ( $TEST_EXIT_CODE -eq 0 ) -and ( "$platform" -eq "standalone" ) ) { $TEST_OUTPUT = Start-Process -NoNewWindow -Wait -PassThru "$UNITY_PROJECT_PATH\Build\UnityTestRunner-Standalone.exe" -ArgumentList "-batchmode -nographics -logFile $FULL_ARTIFACTS_PATH\$platform-player.log -testResults $FULL_ARTIFACTS_PATH\$platform-results.xml" # Catch exit code $TEST_EXIT_CODE = $TEST_OUTPUT.ExitCode - } - # Print unity log output - Get-Content "$FULL_ARTIFACTS_PATH/$platform.log" + # Print player log output + Get-Content "$FULL_ARTIFACTS_PATH/$platform-player.log" + } # Display results if ($TEST_EXIT_CODE -eq 0) diff --git a/dist/steps/run_tests.sh b/dist/steps/run_tests.sh index 291b175..0d98fa9 100755 --- a/dist/steps/run_tests.sh +++ b/dist/steps/run_tests.sh @@ -125,9 +125,8 @@ for platform in ${TEST_PLATFORMS//;/ }; do # Catch exit code TEST_EXIT_CODE=$? - # Player log gets spammed with connection failed messages from the PlayerConnection, - # so we don't print it here. If there was an issue with the player tests, users can inspect - # the log from the arifacts. + # Print player log output + cat "$FULL_ARTIFACTS_PATH/$platform-player.log" fi # Display results diff --git a/dist/test-standalone-scripts/Assets/Editor/UnityTestRunnerAction/PlayerBuildModifier.cs b/dist/test-standalone-scripts/Assets/Editor/UnityTestRunnerAction/PlayerBuildModifier.cs index 98929ba..4381b2b 100644 --- a/dist/test-standalone-scripts/Assets/Editor/UnityTestRunnerAction/PlayerBuildModifier.cs +++ b/dist/test-standalone-scripts/Assets/Editor/UnityTestRunnerAction/PlayerBuildModifier.cs @@ -16,8 +16,8 @@ namespace UnityTestRunnerAction private static bool s_RunningPlayerTests; public BuildPlayerOptions ModifyOptions(BuildPlayerOptions playerOptions) { - // Do not launch the player after the build completes. - playerOptions.options &= ~BuildOptions.AutoRunPlayer; + // Do not launch the player after the build completes. Disable the PlayerConnection. + playerOptions.options &= ~(BuildOptions.AutoRunPlayer | BuildOptions.ConnectToHost | BuildOptions.WaitForPlayerConnection); // Not supporting Mac currently. playerOptions.target = SystemInfo.operatingSystemFamily == OperatingSystemFamily.Windows ? BuildTarget.StandaloneWindows64 : BuildTarget.StandaloneLinux64;