From a8ea78bc35f46743dbb7a371ee372addbf146731 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Mon, 27 Apr 2015 00:58:31 -0700 Subject: [PATCH 1/4] configure: generic run command --- configure | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 6d629bf9807..1de4b42522b 100755 --- a/configure +++ b/configure @@ -19,6 +19,11 @@ err() { exit 1 } +run() { + msg "$@" + "$@" +} + need_ok() { if [ $? -ne 0 ] then @@ -36,8 +41,7 @@ need_cmd() { make_dir() { if [ ! -d $1 ] then - msg "mkdir -p $1" - mkdir -p $1 + run mkdir -p $1 fi } @@ -46,8 +50,7 @@ copy_if_changed() { then msg "leaving $2 unchanged" else - msg "cp $1 $2" - cp -f $1 $2 + run cp -f $1 $2 chmod u-w $2 # make copied artifact read-only fi } @@ -57,8 +60,7 @@ move_if_changed() { then msg "leaving $2 unchanged" else - msg "mv $1 $2" - mv -f $1 $2 + run mv -f $1 $2 chmod u-w $2 # make moved artifact read-only fi } From b982a751f41c2611dff66c62a03384eafb109ed5 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Mon, 27 Apr 2015 01:04:22 -0700 Subject: [PATCH 2/4] configure: Disable valgrind-rpass if there's no valgrind --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 1de4b42522b..5455f1b3ccf 100755 --- a/configure +++ b/configure @@ -733,6 +733,14 @@ then probe CFG_JAVAC javac fi +# the valgrind rpass tests will fail if you don't have a valgrind, but they're +# only disabled if you opt out. +if [ -z "$CFG_VALGRIND" ] +then + CFG_DISABLE_VALGRIND_RPASS=1 + putvar CFG_DISABLE_VALGRIND_RPASS +fi + if [ ! -z "$CFG_GDB" ] then # Store GDB's version From fc7faafae714e713bbe77ea6c784ae400bc0e95d Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Mon, 27 Apr 2015 23:54:30 -0700 Subject: [PATCH 3/4] configure: Fail iff valgrind is explicitly requested but not available --- configure | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 5455f1b3ccf..33407bfcacd 100755 --- a/configure +++ b/configure @@ -737,8 +737,14 @@ fi # only disabled if you opt out. if [ -z "$CFG_VALGRIND" ] then - CFG_DISABLE_VALGRIND_RPASS=1 - putvar CFG_DISABLE_VALGRIND_RPASS + # If the user has explicitly asked for valgrind tests, then fail + if [ -n "$CFG_ENABLE_VALGRIND" ] && [ -n "$CFG_ENABLE_VALGRIND_PROVIDED" ] + then + err "No valgrind present, but valgrind tests explicitly requested" + else + CFG_DISABLE_VALGRIND_RPASS=1 + putvar CFG_DISABLE_VALGRIND_RPASS + fi fi if [ ! -z "$CFG_GDB" ] From 01fc026440382ba542f212fa256c0cd1ee980070 Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Fri, 8 May 2015 10:47:28 -0700 Subject: [PATCH 4/4] mk: Log that valgrind tests are disabled --- mk/main.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/mk/main.mk b/mk/main.mk index c1ce1051d0a..86e808e4ae2 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -195,6 +195,7 @@ ifndef CFG_DISABLE_VALGRIND_RPASS $(info cfg: valgrind-rpass command set to $(CFG_VALGRIND)) CFG_VALGRIND_RPASS :=$(CFG_VALGRIND) else + $(info cfg: disabling valgrind run-pass tests) CFG_VALGRIND_RPASS := endif