summaryrefslogtreecommitdiff
path: root/tests/chutney/integration-e2e
blob: 94bc51bc60cd0502258b1378322ee149ab8da72c (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
#!/usr/bin/env bash
set -xeuo pipefail

cd "$(git rev-parse --show-toplevel)"

./tests/chutney/setup proxy

# Use the same CHUTNEY_PATH through the rest of the test.
# shellcheck disable=SC1091
source tests/chutney/arti.run
# Validate that CHUTNEY_PATH is set.
[ -n "${CHUTNEY_PATH:?}" ]

./tests/chutney/test
./tests/chutney/stop-arti

# Get the socks port of a tor client to use for benchmarking comparison.
# TODO: Do this in a more robust way.
[ -n "${target:?}" ] # should have been set from arti.run
if [ "${target}" = "networks/basic" ]; then
    tor_client_port=9008
else
    echo "Don't know how to get tor client port of target $target"
    exit 1
fi

RUST_LOG=debug target/x86_64-unknown-linux-gnu/release/arti-bench -c "$CHUTNEY_PATH"/net/nodes/arti.toml --socks5 127.0.0.1:"$tor_client_port" -o benchmark_results.json

./tests/chutney/teardown