summaryrefslogtreecommitdiff
path: root/tests/chutney/arti-bench
blob: d37578d86397754470f68772f8225a35f322bf65 (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
#!/usr/bin/env bash
set -xeuo pipefail

if [ -z "${RUST_LOG:-}" ]; then
    echo "Setting RUST_LOG=info for your convenience."
    export RUST_LOG=info
fi

target="networks/basic"
cd "$(git rev-parse --show-toplevel)"

if [ -z "${CHUTNEY_PATH:-}" ]; then
    # Use the default chutney path we set up before.
    CHUTNEY_PATH="$(pwd)/chutney"
    export CHUTNEY_PATH
else
    # CHUTNEY_PATH is set; tell the user about that.
    echo "CHUTNEY_PATH is ${CHUTNEY_PATH}; using your local copy of chutney."
fi

./tests/chutney/setup

cargo run -p arti-bench --release -- -c "${CHUTNEY_PATH}/net/nodes/arti.toml" "$@"

"${CHUTNEY_PATH}"/chutney stop "${CHUTNEY_PATH}/$target"