parent
9eb8a55d91
commit
178a747ba3
|
@ -111,16 +111,19 @@ foreach ( $platform in ${env:TEST_PLATFORMS}.Split(";") )
|
||||||
# Catch exit code
|
# Catch exit code
|
||||||
$TEST_EXIT_CODE = $TEST_OUTPUT.ExitCode
|
$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" ) )
|
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"
|
$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
|
# Catch exit code
|
||||||
$TEST_EXIT_CODE = $TEST_OUTPUT.ExitCode
|
$TEST_EXIT_CODE = $TEST_OUTPUT.ExitCode
|
||||||
}
|
|
||||||
|
|
||||||
# Print unity log output
|
# Print player log output
|
||||||
Get-Content "$FULL_ARTIFACTS_PATH/$platform.log"
|
Get-Content "$FULL_ARTIFACTS_PATH/$platform-player.log"
|
||||||
|
}
|
||||||
|
|
||||||
# Display results
|
# Display results
|
||||||
if ($TEST_EXIT_CODE -eq 0)
|
if ($TEST_EXIT_CODE -eq 0)
|
||||||
|
|
|
@ -125,9 +125,8 @@ for platform in ${TEST_PLATFORMS//;/ }; do
|
||||||
# Catch exit code
|
# Catch exit code
|
||||||
TEST_EXIT_CODE=$?
|
TEST_EXIT_CODE=$?
|
||||||
|
|
||||||
# Player log gets spammed with connection failed messages from the PlayerConnection,
|
# Print player log output
|
||||||
# so we don't print it here. If there was an issue with the player tests, users can inspect
|
cat "$FULL_ARTIFACTS_PATH/$platform-player.log"
|
||||||
# the log from the arifacts.
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Display results
|
# Display results
|
||||||
|
|
|
@ -16,8 +16,8 @@ namespace UnityTestRunnerAction
|
||||||
private static bool s_RunningPlayerTests;
|
private static bool s_RunningPlayerTests;
|
||||||
public BuildPlayerOptions ModifyOptions(BuildPlayerOptions playerOptions)
|
public BuildPlayerOptions ModifyOptions(BuildPlayerOptions playerOptions)
|
||||||
{
|
{
|
||||||
// Do not launch the player after the build completes.
|
// Do not launch the player after the build completes. Disable the PlayerConnection.
|
||||||
playerOptions.options &= ~BuildOptions.AutoRunPlayer;
|
playerOptions.options &= ~(BuildOptions.AutoRunPlayer | BuildOptions.ConnectToHost | BuildOptions.WaitForPlayerConnection);
|
||||||
|
|
||||||
// Not supporting Mac currently.
|
// Not supporting Mac currently.
|
||||||
playerOptions.target = SystemInfo.operatingSystemFamily == OperatingSystemFamily.Windows ? BuildTarget.StandaloneWindows64 : BuildTarget.StandaloneLinux64;
|
playerOptions.target = SystemInfo.operatingSystemFamily == OperatingSystemFamily.Windows ? BuildTarget.StandaloneWindows64 : BuildTarget.StandaloneLinux64;
|
||||||
|
|
Loading…
Reference in New Issue