mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
itest: shuffle test cases to even out blocks mined in tranches
This commit adds a new flag to shuffle all the test cases before running them so tests which require lots of blocks to be mined are less likely to be run in the same tranch. The other benefit is this approach provides a more efficient way to figure which tests are broken since all the differnet backends are running different tranches in their builds, we can identify more failed tests in one push.
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
# Get all the variables.
|
||||
PROCESSES=$1
|
||||
TRANCHES=$2
|
||||
SHUFFLE_SEED=$3
|
||||
|
||||
# Here we also shift 2 times and get the rest of our flags to pass on in $@.
|
||||
shift 2
|
||||
# Here we also shift 3 times and get the rest of our flags to pass on in $@.
|
||||
shift 3
|
||||
|
||||
# Create a variable to hold the final exit code.
|
||||
exit_code=0
|
||||
@@ -13,7 +14,7 @@ exit_code=0
|
||||
# Run commands using xargs in parallel and capture their PIDs
|
||||
pids=()
|
||||
for ((i=0; i<PROCESSES; i++)); do
|
||||
scripts/itest_part.sh $i $TRANCHES $@ &
|
||||
scripts/itest_part.sh $i $TRANCHES $SHUFFLE_SEED $@ &
|
||||
pids+=($!)
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user