Skip to content

Commit d94aaa5

Browse files
committed
Added cleanup stage
1 parent 8f41748 commit d94aaa5

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

evergreen/cleanup-proxy.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -o xtrace # Write all commands first to stderr
4+
5+
# Environment variables used as input:
6+
# OS The current operating system
7+
8+
echo "Attempt to kill proxy server process if present on ${OS}"
9+
if [[ "$OS" =~ Windows|windows ]]; then
10+
tasklist -FI "IMAGENAME eq python.exe"
11+
taskkill -F -FI "IMAGENAME eq python.exe"
12+
# check that it's actually killed
13+
tasklist -FI "IMAGENAME eq python.exe"
14+
else
15+
ps -ax | grep socks5srv.py
16+
pkill -f 'socks5srv.py' || echo 'socks5srv.py was already killed or not launched'
17+
# check that it's actually killed
18+
ps -ax | grep socks5srv.py
19+
fi

evergreen/evergreen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ functions:
10741074
TARGET="TestSocks5Proxy" \
10751075
evergreen/run-tests.sh
10761076
OS=${OS} \
1077-
evergreen/cleanup-test-resources.sh
1077+
evergreen/cleanup-proxy.sh
10781078
pre:
10791079
- func: fetch-source
10801080
- func: prepare-resources

0 commit comments

Comments
 (0)