Patchwork [3/3] scripts/contrib/build-perf-test.sh: change the global results format

login
register
mail settings
Submitter Stanacar, StefanX
Date April 25, 2013, 12:11 p.m.
Message ID <206e29520aa00f7d050b360d8e89daf7df2d95ed.1366891465.git.stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/48871/
State Accepted
Commit 582798f70bf350d2db6911eb8df333ada05f6484
Headers show

Comments

Stanacar, StefanX - April 25, 2013, 12:11 p.m.
When all builds have finished write the hostname, commit and times
on a single line in the global results file (useful for merging later
on files from multiple systems).
Also the final cleaning should be last after writing the results.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 scripts/contrib/build-perf-test.sh | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

Patch

diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index ee30409..0af2cfe 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -239,6 +239,15 @@  do_sync () {
     sleep 3
 }
 
+write_results() {
+    echo -n "`uname -n`,$rev," >> $globalres
+    for i in "${TIMES[@]}"; do
+        echo -n "$i," >> $globalres
+    done
+    echo >> $globalres
+    sed -i '$ s/,$//' $globalres
+}
+
 ####
 
 #
@@ -338,15 +347,10 @@  test1_p3
 test2
 test3
 
+# if we got til here write to global results
+write_results
+
 log "All done, cleaning up..."
 
 do_rmtmp
 do_rmsstate
-
-# if we got til here write to global results
-echo "$rev" >> $globalres
-for i in "${TIMES[@]}"; do
-    echo -n "$i," >> $globalres
-done
-echo >> $globalres
-sed -i '$ s/,$//' $globalres