2018-11-27 04:28:02 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE:-$0}")"; pwd)
|
2019-01-13 17:08:51 -08:00
|
|
|
RESULT_FILE=$ROOT_DIR/results-$(date '+%Y-%m-%d_%H-%M-%S').log
|
|
|
|
echo "Logging to" $RESULT_FILE
|
2019-02-26 14:24:37 -08:00
|
|
|
echo -e $RAY_AWS_SSH_KEY > /root/.ssh/ray-autoscaler_us-west-2.pem && chmod 400 /root/.ssh/ray-autoscaler_us-west-2.pem || true
|
|
|
|
|
|
|
|
|
|
|
|
# Show explicitly which commands are currently running. This should only be AFTER
|
|
|
|
# the private key is placed.
|
|
|
|
set -x
|
|
|
|
|
2019-01-13 17:08:51 -08:00
|
|
|
touch $RESULT_FILE
|
|
|
|
|
|
|
|
run_test(){
|
|
|
|
local test_name=$1
|
|
|
|
|
|
|
|
local CLUSTER="stress_testing_config.yaml"
|
|
|
|
echo "Try running $test_name."
|
|
|
|
{
|
|
|
|
ray up -y $CLUSTER --cluster-name "$test_name" &&
|
|
|
|
sleep 1 &&
|
2019-02-26 14:24:37 -08:00
|
|
|
ray --logging-level=DEBUG submit $CLUSTER --cluster-name "$test_name" "$test_name.py"
|
2019-01-13 17:08:51 -08:00
|
|
|
} || echo "FAIL: $test_name" >> $RESULT_FILE
|
2018-11-27 04:28:02 -08:00
|
|
|
|
2019-01-13 17:08:51 -08:00
|
|
|
# Tear down cluster.
|
|
|
|
if [ "$DEBUG_MODE" = "" ]; then
|
|
|
|
ray down -y $CLUSTER --cluster-name "$test_name"
|
|
|
|
else
|
|
|
|
echo "Not tearing down cluster" $CLUSTER
|
|
|
|
fi
|
|
|
|
}
|
2018-11-27 04:28:02 -08:00
|
|
|
|
2019-01-13 17:08:51 -08:00
|
|
|
pushd "$ROOT_DIR"
|
|
|
|
run_test test_many_tasks_and_transfers
|
|
|
|
run_test test_dead_actors
|
|
|
|
popd
|
2018-11-27 04:28:02 -08:00
|
|
|
|
2019-01-13 17:08:51 -08:00
|
|
|
cat $RESULT_FILE
|
2019-01-16 02:05:16 -08:00
|
|
|
[ ! -s $RESULT_FILE ] || exit 1
|