github.com/decred/dcrlnd@v0.7.6/scripts/itest_part.sh (about)

     1  #!/bin/bash
     2  
     3  # Let's work with absolute paths only, we run in the itest directory itself.
     4  WORKDIR=$(pwd)/lntest/itest
     5  
     6  TRANCHE=$1
     7  NUM_TRANCHES=$2
     8  
     9  # Shift the passed parameters by two, giving us all remaining testing flags in
    10  # the $@ special variable.
    11  shift
    12  shift
    13  
    14  # Windows insists on having the .exe suffix for an executable, we need to add
    15  # that here if necessary.
    16  EXEC="$WORKDIR"/itest.test"$EXEC_SUFFIX"
    17  LND_EXEC="$(pwd)"/dcrlnd-itest"$EXEC_SUFFIX"
    18  echo $EXEC -test.v "$@" -logoutput -goroutinedump -logdir=.logs-tranche$TRANCHE -lndexec=$LND_EXEC -splittranches=$NUM_TRANCHES -runtranche=$TRANCHE
    19  
    20  # Exit code 255 causes the parallel jobs to abort, so if one part fails the
    21  # other is aborted too.
    22  cd "$WORKDIR" || exit 255
    23  $EXEC -test.v "$@" -logoutput -goroutinedump -logdir=.logs-tranche$TRANCHE -lndexec=$LND_EXEC -splittranches=$NUM_TRANCHES -runtranche=$TRANCHE || exit 255