Skip to content

Commit efc46dd

Browse files
committed
Restrict running Valgrind
* Activate on the develop branch * Activate on branches containing the word v-algrind (without hyphen) * Activate if the commit message contains v-algrind (without hyphen)
1 parent b31a108 commit efc46dd

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

testme.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,13 @@ do
224224
VALGRIND_OPTS="$VALGRIND_OPTS ${1#*=}"
225225
;;
226226
--with-valgrind*)
227-
if [[ ${1#*d} != "" ]]
228-
then
229-
VALGRIND_BIN="${1#*=}"
230-
else
231-
VALGRIND_BIN="valgrind"
227+
if [[ "$TRAVIS_BRANCH" == "develop" || "$TRAVIS_BRANCH" == *"valgrind"* || "$TRAVIS_COMMIT_MESSAGE" == *"valgrind"* ]]; then
228+
if [[ ${1#*d} != "" ]]
229+
then
230+
VALGRIND_BIN="${1#*=}"
231+
else
232+
VALGRIND_BIN="valgrind"
233+
fi
232234
fi
233235
start_alive_printing
234236
;;

0 commit comments

Comments
 (0)