@@ -3291,21 +3291,17 @@ make container REGISTRY=e2e VERSION="${E2E_TAG}" ALLOW_STALE_APT=1
3291
3291
make test-tools REGISTRY=e2e
3292
3292
3293
3293
function finish() {
3294
- r=$?
3295
- trap " " INT EXIT ERR
3296
- if [[ $r != 0 ]]; then
3297
- echo
3298
- echo " the directory $DIR was not removed as it contains" \
3299
- " log files useful for debugging"
3300
- fi
3301
- exit $r
3294
+ r=$?
3295
+ trap " " INT EXIT ERR
3296
+ if [[ $r != 0 ]]; then
3297
+ echo
3298
+ echo " the directory $DIR was not removed as it contains" \
3299
+ " log files useful for debugging"
3300
+ fi
3301
+ exit $r
3302
3302
}
3303
3303
trap finish INT EXIT ERR
3304
3304
3305
- echo
3306
- echo " test root is $DIR "
3307
- echo
3308
-
3309
3305
# Run a test function and return its error code. This is needed because POSIX
3310
3306
# dictates that `errexit` does not apply inside a function called in an `if`
3311
3307
# context. But if we don't call it with `if`, then it terminates the whole
@@ -3345,10 +3341,24 @@ umask 0002
3345
3341
# Mark all repos as safe, to avoid "dubious ownership".
3346
3342
git config --global --add safe.directory ' *'
3347
3343
3348
- # Iterate over the chosen tests and run them.
3349
3344
FAILS=()
3350
3345
FINAL_RET=0
3351
3346
RUNS=" ${RUNS:- 1} "
3347
+
3348
+ echo
3349
+ echo " test root is $DIR "
3350
+ if (( "${RUNS} " > 1 )) ; then
3351
+ echo " RUNS=$RUNS "
3352
+ fi
3353
+ if [[ " ${CLEANUP:- } " == 0 ]]; then
3354
+ echo " CLEANUP disabled"
3355
+ fi
3356
+ if [[ -n " ${VERBOSE:- } " ]]; then
3357
+ echo " VERBOSE enabled"
3358
+ fi
3359
+ echo
3360
+
3361
+ # Iterate over the chosen tests and run them.
3352
3362
for t; do
3353
3363
TEST_RET=0
3354
3364
RUN=0
@@ -3377,6 +3387,13 @@ for t; do
3377
3387
if [[ " $RUN_RET " != 42 ]]; then
3378
3388
echo " FAIL: unknown error"
3379
3389
fi
3390
+ if [[ -n " ${VERBOSE:- } " ]]; then
3391
+ echo -ne " \n\n"
3392
+ echo " LOG ----------------------"
3393
+ cat " ${LOG} .${RUN} "
3394
+ echo " --------------------------"
3395
+ echo -ne " \n\n"
3396
+ fi
3380
3397
fi
3381
3398
remove_containers || true
3382
3399
RUN=$(( RUN+ 1 ))
0 commit comments