Skip to content

Commit abd0eb9

Browse files
authored
Merge pull request #5816 from larsewi/locks
testall: Added option to not run with --no-locks
2 parents 7f71367 + 63f0873 commit abd0eb9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

tests/acceptance/testall

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ usage() {
276276
echo " tests will always run one by one."
277277
echo " --verbose Run tests with verbose logging"
278278
echo " --debug Run tests with debug logging"
279+
echo " --no-no-lock The --no-lock option is set by default. However it can be"
280+
echo " useful to debug with locks"
279281
}
280282

281283
workdir() {
@@ -492,12 +494,12 @@ export CFENGINE_TEST_OVERRIDE_WORKDIR TEMP CFENGINE_TEST_OVERRIDE_EXTENSION_LIBR
492494
then
493495
printf "\"$LIBTOOL\" --mode=execute " >> "$WORKDIR/runtest"
494496
fi
495-
printf "valgrind ${VALGRIND_OPTS} \"$AGENT\" $VERBOSE $DEBUG -Klf \"$TEST\" -D ${PASS_NUM:+test_pass_$PASS_NUM,}${BASECLASSES},${EXTRACLASSES} 2>&1\n" >> "$WORKDIR/runtest"
497+
printf "valgrind ${VALGRIND_OPTS} \"$AGENT\" $VERBOSE $DEBUG -${NO_LOCK}lf \"$TEST\" -D ${PASS_NUM:+test_pass_$PASS_NUM,}${BASECLASSES},${EXTRACLASSES} 2>&1\n" >> "$WORKDIR/runtest"
496498
elif [ x"$PRELOAD_ASAN" != x ]
497499
then
498-
printf "LD_PRELOAD=$PRELOAD_ASAN \"$AGENT\" $VERBOSE $DEBUG -Klf \"$TEST\" -D ${PASS_NUM:+test_pass_$PASS_NUM,}${BASECLASSES},${EXTRACLASSES}\n" >> "$WORKDIR/runtest"
500+
printf "LD_PRELOAD=$PRELOAD_ASAN \"$AGENT\" $VERBOSE $DEBUG -${NO_LOCK}lf \"$TEST\" -D ${PASS_NUM:+test_pass_$PASS_NUM,}${BASECLASSES},${EXTRACLASSES}\n" >> "$WORKDIR/runtest"
499501
else
500-
printf "\"$AGENT\" $VERBOSE $DEBUG -Klf \"$TEST\" -D ${PASS_NUM:+test_pass_$PASS_NUM,}${BASECLASSES},${EXTRACLASSES}\n" >> "$WORKDIR/runtest"
502+
printf "\"$AGENT\" $VERBOSE $DEBUG -${NO_LOCK}lf \"$TEST\" -D ${PASS_NUM:+test_pass_$PASS_NUM,}${BASECLASSES},${EXTRACLASSES}\n" >> "$WORKDIR/runtest"
501503
fi
502504

503505
chmod +x "$WORKDIR/runtest"
@@ -777,6 +779,7 @@ export CFENGINE_TEST_OVERRIDE_WORKDIR TEMP CFENGINE_TEST_OVERRIDE_EXTENSION_LIBR
777779
}
778780

779781

782+
NO_LOCK="K"
780783
ORIG_ARGS=
781784
while true
782785
do
@@ -878,6 +881,8 @@ do
878881
VERBOSE="-v";;
879882
--debug)
880883
DEBUG="--debug";;
884+
--no-no-lock)
885+
NO_LOCK="";;
881886
--stay-in-workdir)
882887
# Internal option. Meant to keep sub invocations from interfering by
883888
# writing files only into the workdir.

0 commit comments

Comments
 (0)