mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-07 05:49:59 +02:00
make+scripts: use pre-compiled btcd in itest
To make sure we build the exact version of btcd that is referenced in the project's go.mod file and to not overwrite any binary the user might already have installed on the system, we compile btcd into an explicit file in the itest directory. This should also speed up invocations of "make itest-only" because the test harness doesn't always compile btcd on its own. We also fix a bug with the version parsing where adding a "replace" directive in the go.mod would result in the awk commands to extract the wrong version. Because we no longer use the DEPGET goal to build and install btcd, using a replace directive now actually works for itests.
This commit is contained in:
@ -15,9 +15,10 @@ shift
|
||||
# that here if necessary.
|
||||
EXEC="$WORKDIR"/itest.test"$EXEC_SUFFIX"
|
||||
LND_EXEC="$WORKDIR"/lnd-itest"$EXEC_SUFFIX"
|
||||
echo $EXEC -test.v "$@" -logoutput -goroutinedump -logdir=.logs-tranche$TRANCHE -lndexec=$LND_EXEC -splittranches=$NUM_TRANCHES -runtranche=$TRANCHE
|
||||
BTCD_EXEC="$WORKDIR"/btcd-itest"$EXEC_SUFFIX"
|
||||
echo $EXEC -test.v "$@" -logoutput -goroutinedump -logdir=.logs-tranche$TRANCHE -lndexec=$LND_EXEC -btcdexec=$BTCD_EXEC -splittranches=$NUM_TRANCHES -runtranche=$TRANCHE
|
||||
|
||||
# Exit code 255 causes the parallel jobs to abort, so if one part fails the
|
||||
# other is aborted too.
|
||||
cd "$WORKDIR" || exit 255
|
||||
$EXEC -test.v "$@" -logoutput -goroutinedump -logdir=.logs-tranche$TRANCHE -lndexec=$LND_EXEC -splittranches=$NUM_TRANCHES -runtranche=$TRANCHE || exit 255
|
||||
$EXEC -test.v "$@" -logoutput -goroutinedump -logdir=.logs-tranche$TRANCHE -lndexec=$LND_EXEC -btcdexec=$BTCD_EXEC -splittranches=$NUM_TRANCHES -runtranche=$TRANCHE || exit 255
|
||||
|
Reference in New Issue
Block a user