Skip to content

Commit

Permalink
[devops] Clean up before and after running the Windows tests remotely. (
Browse files Browse the repository at this point in the history
#21454)

Also collect any crash reports from the remote machine.
  • Loading branch information
rolfbjarne authored Oct 16, 2024
1 parent 12e1e33 commit 0674deb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 12 additions & 0 deletions tests/dotnet/Windows/collect-binlogs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ cd "$(dirname "${BASH_SOURCE[0]}")"

TOPLEVEL="$(git rev-parse --show-toplevel)"

# Abort any agents that are still alive.
# Aborting creates a crash report, and we can investigate why they got stuck.
ps auxww || true
pkill -6 -f Broker.exe || true
pkill -6 -f Build.exe || true
pkill -6 -f Broker.dll || true
pkill -6 -f Build.dll || true
ps auxww || true

# Collect and zip up all the binlogs
mkdir -p ~/remote_build_testing/binlogs
rsync -avv --prune-empty-dirs --exclude 'artifacts/' --include '*/' --include '*.binlog' --exclude '*' "$TOPLEVEL/.." ~/remote_build_testing/binlogs
Expand Down Expand Up @@ -35,6 +44,9 @@ fi

ps auxww > ~/remote_build_testing/processes.txt || true

# Collect any crash reports.
zip -9r ~/remote_build_testing/windows-remote-logs.zip ~/Library/Logs/DiagnosticReports || true

ls -la ~/Library/Caches/Xamarin/XMA/SDKs/dotnet/ >> ~/remote_build_testing/dotnet-debug.txt 2>&1 || true
cat ~/Library/Caches/Xamarin/XMA/SDKs/dotnet/NuGet.config >> ~/remote_build_testing/dotnet-debug.txt 2>&1 || true
cat ~/Library/Caches/Xamarin/XMA/SDKs/.home/.nuget/NuGet/NuGet.Config >> ~/remote_build_testing/dotnet-debug.txt 2>&1 || true
6 changes: 4 additions & 2 deletions tools/devops/automation/scripts/clean-for-remote-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ rm -rf ~/remote_build_testing

# Kill any existing brokers and builders
ps auxww || true
pkill -f Broker.exe || true
pkill -f Build.exe || true
pkill -6 -f Broker.exe || true
pkill -6 -f Build.exe || true
pkill -6 -f Broker.dll || true
pkill -6 -f Build.dll || true
ps auxww || true

5 comments on commit 0674deb

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.