From e69702bab5b34c5b1dc2c7593bfbd307d5ffdf84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20=C5=A0kvorc?= Date: Wed, 13 Mar 2019 13:44:30 +0100 Subject: [PATCH] Use environment variables (#176) Passing along no-name command line arguments when using make (from Nimbus) would need make target revamps that are a bit clumsy AFAIK, so using environment variables in the spirit of USE_MULTITAIL to get the number of validators and nodes makes more sense to me. This lets us run the sim from nim-beacon-chain with ```bash VALIDATORS=512 NODES=100 USE_MULTITAIL="yes" tests/simulation/start.sh ``` and from Nimbus with: ```bash VALIDATORS=512 NODES=100 USE_MULTITAIL="yes" make eth2_network_simulation ``` Also makes for a more verbose launch process. --- tests/simulation/start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/simulation/start.sh b/tests/simulation/start.sh index d67a9a2de..3e8d4a4c0 100755 --- a/tests/simulation/start.sh +++ b/tests/simulation/start.sh @@ -10,8 +10,8 @@ trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT # Set a default value for the env vars usually supplied by nimbus Makefile -NUM_VALIDATORS=${1:-100} -NUM_NODES=${2:-9} +NUM_VALIDATORS=${VALIDATORS:-100} +NUM_NODES=${NODES:-9} cd $SIM_ROOT mkdir -p "$SIMULATION_DIR"