From 97b5c30c5882418937e25117a0111c4e71a2689c Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 18 Aug 2019 01:19:27 +0200 Subject: [PATCH 1/1] smpirun: add a -quiet argument, allowing failing tests in tesh --- docs/manpages/smpirun.1 | 3 +++ src/smpi/smpirun.in | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/manpages/smpirun.1 b/docs/manpages/smpirun.1 index 5166c16113..01f3636167 100644 --- a/docs/manpages/smpirun.1 +++ b/docs/manpages/smpirun.1 @@ -70,6 +70,9 @@ Trace resource utilization. .TP \fB\-trace-file\fR Name of the tracefile +.TP +\fB\-quiet\fR +Reduce output verbosity. This is useful to make tests reproducible. .SH SIMULATION OPTIONS You can change many simulation parameter on the command line by passing diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index 72d381929d..4bc14913ad 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -72,6 +72,7 @@ HOSTFILE="" HOSTFILETMP=0 MAPOPT=0 REPLAY=0 +QUIET="" unset pid @@ -202,6 +203,10 @@ while true; do SIMOPTS="$SIMOPTS --cfg=smpi/keep-temps:yes" shift 1 ;; + "-quiet") + QUIET="true" + shift 1 + ;; "-wrapper") WRAPPER="$2" shift 2 @@ -559,7 +564,7 @@ pid="" # Keep temporary files on failures to help debugging # if [ ${status} -ne 0 ] ; then - if [ -z "${KEEP}" ]; then + if [ -z "${KEEP}" -a -z "${QUIET}" ]; then echo ${EXEC} ${PRIVATIZE} ${TRACEOPTIONS} ${SIMOPTS} ${PLATFORMTMP} ${APPLICATIONTMP} if [ ${HOSTFILETMP} = 1 ] ; then echo "Generated hostfile ${HOSTFILE} kept." @@ -567,9 +572,9 @@ if [ ${status} -ne 0 ] ; then if [ ${UNROLLEDHOSTFILETMP} = 1 ] ; then echo "Generated unrolled hostfile ${UNROLLEDHOSTFILE} kept." fi + KEEP=true fi echo "Execution failed with code ${status}." - KEEP=true fi smpirun_cleanup -- 2.20.1