File tree 2 files changed +23
-6
lines changed
2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ err() {
19
19
exit 1
20
20
}
21
21
22
+ run () {
23
+ msg " $@ "
24
+ " $@ "
25
+ }
26
+
22
27
need_ok () {
23
28
if [ $? -ne 0 ]
24
29
then
@@ -36,8 +41,7 @@ need_cmd() {
36
41
make_dir () {
37
42
if [ ! -d $1 ]
38
43
then
39
- msg " mkdir -p $1 "
40
- mkdir -p $1
44
+ run mkdir -p $1
41
45
fi
42
46
}
43
47
@@ -46,8 +50,7 @@ copy_if_changed() {
46
50
then
47
51
msg " leaving $2 unchanged"
48
52
else
49
- msg " cp $1 $2 "
50
- cp -f $1 $2
53
+ run cp -f $1 $2
51
54
chmod u-w $2 # make copied artifact read-only
52
55
fi
53
56
}
@@ -57,8 +60,7 @@ move_if_changed() {
57
60
then
58
61
msg " leaving $2 unchanged"
59
62
else
60
- msg " mv $1 $2 "
61
- mv -f $1 $2
63
+ run mv -f $1 $2
62
64
chmod u-w $2 # make moved artifact read-only
63
65
fi
64
66
}
@@ -733,6 +735,20 @@ then
733
735
probe CFG_JAVAC javac
734
736
fi
735
737
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
+
736
752
if [ ! -z " $CFG_GDB " ]
737
753
then
738
754
# Store GDB's version
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ ifndef CFG_DISABLE_VALGRIND_RPASS
195
195
$(info cfg : valgrind-rpass command set to $(CFG_VALGRIND ) )
196
196
CFG_VALGRIND_RPASS :=$(CFG_VALGRIND )
197
197
else
198
+ $(info cfg : disabling valgrind run-pass tests)
198
199
CFG_VALGRIND_RPASS :=
199
200
endif
200
201
You can’t perform that action at this time.
0 commit comments