aboutsummaryrefslogtreecommitdiff
path: root/tests/phase0/run-stress-tests.sh
blob: 20e8e7bc554d56b450fc4546de81aa8bcb691a3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash

set -euo pipefail

project_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
build_dir="${1:-${project_root}/build}"
unit_tests="${build_dir}/tests/unit_tests/unit_tests"
timeout_seconds="${MONZERO_STRESS_TIMEOUT:-1800}"

if [[ ! -x "${unit_tests}" ]]; then
  echo "Unit-test binary not found: ${unit_tests}" >&2
  echo "Build it with: cmake --build ${build_dir} --target unit_tests -j2" >&2
  exit 1
fi

export DNS_PUBLIC="${DNS_PUBLIC:-tcp://1.1.1.1}"

echo "Running the pruning-boundary concurrency stress test (timeout: ${timeout_seconds}s)"
exec timeout --signal=INT --kill-after=30 "${timeout_seconds}" \
  "${unit_tests}" \
  --gtest_color=no \
  --gtest_filter=cryptonote_protocol_handler.race_condition