Support Test Proxy logging error output into a different log file (#6275)
Co-authored-by: alzimmermsft <48699787+alzimmermsft@users.noreply.github.com>
This commit is contained in:
parent
cdb6bc0a0f
commit
d03f77a4b0
@ -5,6 +5,7 @@ steps:
|
||||
- pwsh: |
|
||||
New-Item -ItemType Directory -Force "${{ parameters.rootFolder }}/proxy-logs"
|
||||
Copy-Item -Path "${{ parameters.rootFolder }}/test-proxy.log" -Destination "${{ parameters.rootFolder }}/proxy-logs/proxy.log"
|
||||
Copy-Item -Path "${{ parameters.rootFolder }}/test-proxy-error.log" -Destination "${{ parameters.rootFolder }}/proxy-logs/proxy-error.log"
|
||||
displayName: Copy Log File
|
||||
condition: succeededOrFailed()
|
||||
|
||||
|
||||
@ -51,7 +51,8 @@ steps:
|
||||
- pwsh: |
|
||||
$Process = Start-Process $(PROXY_EXE) `
|
||||
-ArgumentList "start -u --storage-location ${{ parameters.rootFolder }}" `
|
||||
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log
|
||||
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log `
|
||||
-RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=PROXY_PID]$($Process.Id)"
|
||||
displayName: 'Run the testproxy - windows'
|
||||
@ -59,7 +60,7 @@ steps:
|
||||
|
||||
# nohup does NOT continue beyond the current session if you use it within powershell
|
||||
- bash: |
|
||||
nohup $(PROXY_EXE) &>${{ parameters.rootFolder }}/test-proxy.log &
|
||||
nohup $(PROXY_EXE) 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &
|
||||
|
||||
echo $! > $(Build.SourcesDirectory)/test-proxy.pid
|
||||
echo "##vso[task.setvariable variable=PROXY_PID]$(cat $(Build.SourcesDirectory)/test-proxy.pid)"
|
||||
|
||||
@ -55,7 +55,8 @@ steps:
|
||||
- pwsh: |
|
||||
$Process = Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe `
|
||||
-ArgumentList "start -u --storage-location ${{ parameters.rootFolder }}" `
|
||||
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log
|
||||
-NoNewWindow -PassThru -RedirectStandardOutput ${{ parameters.rootFolder }}/test-proxy.log `
|
||||
-RedirectStandardError ${{ parameters.rootFolder }}/test-proxy-error.log
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=PROXY_PID]$($Process.Id)"
|
||||
displayName: 'Run the testproxy - windows'
|
||||
@ -65,7 +66,7 @@ steps:
|
||||
|
||||
# nohup does NOT continue beyond the current session if you use it within powershell
|
||||
- bash: |
|
||||
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy &>${{ parameters.rootFolder }}/test-proxy.log &
|
||||
nohup $(Build.BinariesDirectory)/test-proxy/test-proxy 1>${{ parameters.rootFolder }}/test-proxy.log 2>${{ parameters.rootFolder }}/test-proxy-error.log &
|
||||
|
||||
echo $! > $(Build.SourcesDirectory)/test-proxy.pid
|
||||
echo "##vso[task.setvariable variable=PROXY_PID]$(cat $(Build.SourcesDirectory)/test-proxy.pid)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user