File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ err() {
1919 exit 1
2020}
2121
22+ run () {
23+ msg " $@ "
24+ " $@ "
25+ }
26+
2227need_ok () {
2328 if [ $? -ne 0 ]
2429 then
@@ -36,8 +41,7 @@ need_cmd() {
3641make_dir () {
3742 if [ ! -d $1 ]
3843 then
39- msg " mkdir -p $1 "
40- mkdir -p $1
44+ run mkdir -p $1
4145 fi
4246}
4347
@@ -46,8 +50,7 @@ copy_if_changed() {
4650 then
4751 msg " leaving $2 unchanged"
4852 else
49- msg " cp $1 $2 "
50- cp -f $1 $2
53+ run cp -f $1 $2
5154 chmod u-w $2 # make copied artifact read-only
5255 fi
5356}
@@ -57,8 +60,7 @@ move_if_changed() {
5760 then
5861 msg " leaving $2 unchanged"
5962 else
60- msg " mv $1 $2 "
61- mv -f $1 $2
63+ run mv -f $1 $2
6264 chmod u-w $2 # make moved artifact read-only
6365 fi
6466}
@@ -733,6 +735,20 @@ then
733735 probe CFG_JAVAC javac
734736fi
735737
738+ # the valgrind rpass tests will fail if you don't have a valgrind, but they're
739+ # only disabled if you opt out.
740+ if [ -z " $CFG_VALGRIND " ]
741+ then
742+ # If the user has explicitly asked for valgrind tests, then fail
743+ if [ -n " $CFG_ENABLE_VALGRIND " ] && [ -n " $CFG_ENABLE_VALGRIND_PROVIDED " ]
744+ then
745+ err " No valgrind present, but valgrind tests explicitly requested"
746+ else
747+ CFG_DISABLE_VALGRIND_RPASS=1
748+ putvar CFG_DISABLE_VALGRIND_RPASS
749+ fi
750+ fi
751+
736752if [ ! -z " $CFG_GDB " ]
737753then
738754 # Store GDB's version
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ ifndef CFG_DISABLE_VALGRIND_RPASS
195195 $(info cfg : valgrind-rpass command set to $(CFG_VALGRIND ) )
196196 CFG_VALGRIND_RPASS :=$(CFG_VALGRIND )
197197else
198+ $(info cfg : disabling valgrind run-pass tests)
198199 CFG_VALGRIND_RPASS :=
199200endif
200201
You can’t perform that action at this time.
0 commit comments