X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/7293f6c6fc7326ba742f655ffc79db045da285e8..6640d690ebdafa3ee2c38d48b791458ffda10984:/Experimentations/run-all?ds=sidebyside diff --git a/Experimentations/run-all b/Experimentations/run-all index bf282cc..6d556ec 100755 --- a/Experimentations/run-all +++ b/Experimentations/run-all @@ -79,6 +79,12 @@ outfile() { echo "$*" | sed 's,[^ ]*/,,g;s/\.xml//;y/ /_/' } +summary() { + sed -n '\!^\[main/INFO\] ,----\[ Results \]!,${ + /send\|recv\|wall clock\|Simulation succeeded/d;p; + }' "$1" +} + for plat in "${PLATFORMS[@]}"; do tmp=$(basename "$plat" ".xml") plat_output="$RESULTS/plat_$tmp" @@ -102,15 +108,20 @@ for plat in "${PLATFORMS[@]}"; do log "Run: ${cmd[@]}"$'\n'"... &> $out" if [ $overwrite = 0 -a -e "$out" ]; then log "already run !" - tail -n4 "$out" + summary "$out" continue fi if [ $debug = 1 ]; then log "skipped (dry-run)" else echo "# ${cmd[@]}" > "$out" - "${cmd[@]}" >> "$out" 2>&1 - tail -n4 "$out" + if "${cmd[@]}" >> "$out" 2>&1; then + summary "$out" + else + grep -v '/INFO\]' "$out" + fi +### FIXME : make this step optional +gzip --best "$out" fi done done