blob: 7e0643f18c5031d28067f5fd539d63fc86398b1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/usr/bin/env bash
set -xeuo pipefail
# Set and fully resolve chutney bin if not already set.
: "${CHUTNEY_BIN:=$(type -P chutney)}"
if [ -z "${CHUTNEY_BIN:-}" ]; then
echo "Couldn't locate chutney bin. Ensure it's on PATH or set CHUTNEY_BIN."
echo "You can install with:"
echo "python3 -m pip install git+https://gitlab.torproject.org/tpo/core/chutney.git"
exit 1
elif [ ! -x "$CHUTNEY_BIN" ]; then
echo "CHUTNEY_BIN='$CHUTNEY_BIN' doesn't exist or isn't executable"
exit 1
else
# CHUTNEY_BIN is set; tell the user so.
echo "Using chutney at '${CHUTNEY_BIN}'"
fi
export CHUTNEY_DATA_DIR="${CHUTNEY_DATA_DIR:-$(pwd)}"
if [ -z "${RUST_LOG:-}" ]; then
echo "Setting RUST_LOG=info for your convenience."
export RUST_LOG=info
fi
target="basic"
cd "$(git rev-parse --show-toplevel)"
./tests/chutney/setup
cargo run -p arti-bench --locked --release -- -c "${CHUTNEY_DATA_DIR}/nodes/arti.toml" "$@"
"${CHUTNEY_BIN}" stop "$target"
|