summaryrefslogtreecommitdiff
path: root/evergreen/powercycle_run_test.sh
blob: 4d82ea0ef7d3ee17321c59aff01a65d5b6e37518 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"

cd src

set -o errexit
set -o verbose

if [ "Windows_NT" = "$OS" ]; then
  user=Administrator
else
  user=$USER
fi

activate_venv
# Set an exit trap so we can save the real exit status (see SERVER-34033).
trap 'echo $? > error_exit.txt; exit 0' EXIT
set +o errexit
eval $python -u buildscripts/resmoke.py powercycle run \
  "--sshUserHost=$(printf "%s@%s" "$user" "${private_ip_address}") \
  --sshConnection=\"-i powercycle.pem\" \
  --taskName=${task_name} \
  ${run_powercycle_args}"