diff --git a/.azure-pipelines/steps/run-snapshot-test.yml b/.azure-pipelines/steps/run-snapshot-test.yml index 43c8a8c1de1a..aad9fede6006 100644 --- a/.azure-pipelines/steps/run-snapshot-test.yml +++ b/.azure-pipelines/steps/run-snapshot-test.yml @@ -146,8 +146,12 @@ steps: # Run crash tests - ${{ if and(eq(parameters.isLinux, true), eq(parameters.isNoop, false)) }}: - bash: | - LOGS=$(${{ parameters.dockerComposePath }} -f $(COMPOSE_PATH) -p ddtrace_$(Build.BuildNumber) run -e dockerTag=$(dockerTag) -e CRASH_APP_ON_STARTUP=1 -e COMPlus_DbgEnableMiniDump=0 ${{ parameters.target }}) - echo $LOGS + LOGS="" + while IFS= read -r line + do + echo "$line" # Output the log line to stdout in real-time + LOGS+="$line"$'\n' # Capture each line into LOGS variable + done < <(${{ parameters.dockerComposePath }} -f $(COMPOSE_PATH) -p ddtrace_$(Build.BuildNumber) run -e dockerTag=$(dockerTag) -e CRASH_APP_ON_STARTUP=1 -e COMPlus_DbgEnableMiniDump=0 ${{ parameters.target }}) # check logs for evidence of crash detection in the output expected="The crash may have been caused by automatic instrumentation"