plugeth-statediff/scripts/run-test-stack.sh

37 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/bash
set -ex
2024-06-27 13:16:59 +00:00
# Note: stack path should be absolute, otherwise SO looks for it in packaged stacks
stack_dir=$(readlink -f "${1:-../fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-plugeth}")
[[ -d "$stack_dir" ]]
CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
# By default assume we are running in the project root.
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(git rev-parse --show-toplevel)/..}"
laconic_so="laconic-so --verbose --stack $stack_dir"
2024-06-26 12:05:08 +00:00
# Don't run geth/plugeth in the debugger, it will swallow error backtraces
echo CERC_REMOTE_DEBUG=false >> $CONFIG_DIR/stack.env
if [[ -z $SKIP_BUILD ]]; then
$laconic_so setup-repositories \
--exclude git.vdb.to/cerc-io/plugeth-statediff
# Assume the tested image has been built separately
$laconic_so build-containers \
2024-06-27 13:16:59 +00:00
--include cerc/fixturenet-eth-genesis-postmerge,cerc/fixturenet-plugeth-plugeth,cerc/fixturenet-eth-lighthouse
# --include cerc/fixturenet-eth-genesis-postmerge
# --exclude cerc/plugeth-statediff
fi
2024-06-26 08:59:59 +00:00
if ! $laconic_so deploy \
--env-file $CONFIG_DIR/stack.env \
--cluster test up
then
$laconic_so deploy --cluster test logs
exit 1
fi