From ab3b9e12512e48a8d2054fc305f5f3d46fe126ad Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Wed, 10 Jul 2024 13:59:57 +0200 Subject: [PATCH] =?UTF-8?q?runtest.sh=20:=20ajout=20option=20-n=20=C2=AB?= =?UTF-8?q?=20ne=20pas=20tuer=20processus=20=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtest.sh | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/runtest.sh b/runtest.sh index c008e89..e835a99 100755 --- a/runtest.sh +++ b/runtest.sh @@ -21,11 +21,12 @@ aide() { cat <&1 | traiter_test + if [[ $KILL -eq 1 ]] + then + eval ${COMMEXEC} 2>&1 | traiter_test + else + eval ${COMMEXEC} + fi elif [[ $# -gt 0 ]] # exécuter les tests passés en arguments then @@ -122,7 +133,12 @@ then do echo "Tester « $test »" COMMEXEC="${COMMANDE} -f \"$test\" ${TESTFILE}" - eval ${COMMEXEC} 2>&1 | traiter_test + if [[ $KILL -eq 1 ]] + then + eval ${COMMEXEC} 2>&1 | traiter_test + else + eval ${COMMEXEC} + fi done else # Afficher les noms des suites de tests @@ -147,7 +163,12 @@ else COMMEXEC="${COMMANDE} -f \"$test\" ${TESTFILE}" CURIFS=$IFS IFS=$OLDIFS - eval ${COMMEXEC} 2>&1 | traiter_test + if [[ $KILL -eq 1 ]] + then + lstmeval ${COMMEXEC} 2>&1 | traiter_test + else + eval ${COMMEXEC} + fi IFS=$CURIFS done IFS=$OLDIFS