[ARVADOS-DEV] updated: 2dae0755cb100b9fc81ba1768fc9233a17cc30ca
git at public.curoverse.com
git at public.curoverse.com
Thu May 21 10:28:56 EDT 2015
Summary of changes:
jenkins/create-plot-data-from-log.sh | 19 +++++++++++--------
jenkins/run-tests.sh | 2 +-
2 files changed, 12 insertions(+), 9 deletions(-)
via 2dae0755cb100b9fc81ba1768fc9233a17cc30ca (commit)
via 9d3fa25b005586925024bd7995f846df562cec65 (commit)
from cb1c4d5827f2dba8531e55e384267ecb5ae19620 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 2dae0755cb100b9fc81ba1768fc9233a17cc30ca
Author: Nico Cesar <nico at nicocesar.com>
Date: Thu May 21 10:27:14 2015 -0400
6061: comment cleanup and final version tested. it works
closes #6061
diff --git a/jenkins/create-plot-data-from-log.sh b/jenkins/create-plot-data-from-log.sh
index 26fd655..ed5ee53 100755
--- a/jenkins/create-plot-data-from-log.sh
+++ b/jenkins/create-plot-data-from-log.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
build=$1
file=$2
@@ -19,7 +19,7 @@ fi
if [ ! -e $file ]
then
usage
- echo "$file doesn't exists! exiting"
+ echo "$file doesn't exist! exiting"
exit 2
fi
if [ ! -w $outputdir ]
@@ -30,7 +30,9 @@ then
fi
#------------------------------
-## max lines that a test will output
+## MAXLINE is the amount of lines that will read after the pattern
+## is match (the logfile could be hundred thousands lines long).
+## 1000 should be safe enough to capture all the output of the individual test
MAXLINES=1000
## TODO: check $build and $file make sense
@@ -40,14 +42,15 @@ for test in \
test_Create,_show,_and_update_description_for_large_collection_with_manifest_text_of_100000 \
test_Create_one_large_collection_of_20000000_and_one_small_collection_of_10000_and_combine_them
do
-(zgrep -i -E -A$MAXLINES "^[A-Za-z0-9]+Test: $test" $file && echo "----") | tail --lines=+3|grep -B$MAXLINES -E "^-*$" -m1 > $outputdir/$test-$build.txt
+ cleaned_test=$(echo $test | tr -d ",.:;/")
+ (zgrep -i -E -A$MAXLINES "^[A-Za-z0-9]+Test: $test" $file && echo "----") | tail -n +1 | tail --lines=+3|grep -B$MAXLINES -E "^-*$" -m1 > $outputdir/$cleaned_test-$build.txt
result=$?
if [ $result -eq 0 ]
then
- echo processing $outputdir/$test-$build.txt creating $outputdir/$test.csv
- echo $(grep ^Completed $outputdir/$test-$build.txt | perl -n -e '/^Completed (.*) in [0-9]+ms.*$/;print "".++$line."-$1,";' | perl -p -e 's/,$//g'|tr " " "_" ) > $outputdir/$test.csv
- echo $(grep ^Completed $outputdir/$test-$build.txt | perl -n -e '/^Completed.*in ([0-9]+)ms.*$/;print "$1,";' | perl -p -e 's/,$//g' ) >> $outputdir/$test.csv
- #echo URL=https://ci.curoverse.com/view/job/arvados-api-server/ws/apps/workbench/log/$test-$build.txt/*view*/ >> $outputdir/$test.properties
+ echo processing $outputdir/$cleaned_test-$build.txt creating $outputdir/$cleaned_test.csv
+ echo $(grep ^Completed $outputdir/$cleaned_test-$build.txt | perl -n -e '/^Completed (.*) in [0-9]+ms.*$/;print "".++$line."-$1,";' | perl -p -e 's/,$//g'|tr " " "_" ) > $outputdir/$cleaned_test.csv
+ echo $(grep ^Completed $outputdir/$cleaned_test-$build.txt | perl -n -e '/^Completed.*in ([0-9]+)ms.*$/;print "$1,";' | perl -p -e 's/,$//g' ) >> $outputdir/$cleaned_test.csv
+ #echo URL=https://ci.curoverse.com/view/job/arvados-api-server/ws/apps/workbench/log/$cleaned_test-$build.txt/*view*/ >> $outputdir/$test.properties
else
echo "$test was't found on $file"
fi
commit 9d3fa25b005586925024bd7995f846df562cec65
Author: Nico Cesar <nico at nicocesar.com>
Date: Wed May 20 17:47:52 2015 -0400
script working better
diff --git a/jenkins/create-plot-data-from-log.sh b/jenkins/create-plot-data-from-log.sh
index c3a800f..26fd655 100755
--- a/jenkins/create-plot-data-from-log.sh
+++ b/jenkins/create-plot-data-from-log.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
build=$1
file=$2
@@ -40,13 +40,13 @@ for test in \
test_Create,_show,_and_update_description_for_large_collection_with_manifest_text_of_100000 \
test_Create_one_large_collection_of_20000000_and_one_small_collection_of_10000_and_combine_them
do
- zgrep -i -E -A$MAXLINES "^[A-Za-z0-9]+Test: $test" $file | tail --lines=+3|grep -B$MAXLINES -E "^-*$" -m1 > $outputdir/$test-$build.txt
+(zgrep -i -E -A$MAXLINES "^[A-Za-z0-9]+Test: $test" $file && echo "----") | tail --lines=+3|grep -B$MAXLINES -E "^-*$" -m1 > $outputdir/$test-$build.txt
result=$?
if [ $result -eq 0 ]
then
echo processing $outputdir/$test-$build.txt creating $outputdir/$test.csv
- echo $(grep ^Completed $test-$build.txt | perl -n -e '/^Completed (.*) in [0-9]+ms.*$/;print "".++$line."-$1,";' | perl -p -e 's/,$//g'|tr " " "_" ) > $outputdir/$test.csv
- echo $(grep ^Completed $test-$build.txt | perl -n -e '/^Completed.*in ([0-9]+)ms.*$/;print "$1,";' | perl -p -e 's/,$//g' ) >> $outputdir/$test.csv
+ echo $(grep ^Completed $outputdir/$test-$build.txt | perl -n -e '/^Completed (.*) in [0-9]+ms.*$/;print "".++$line."-$1,";' | perl -p -e 's/,$//g'|tr " " "_" ) > $outputdir/$test.csv
+ echo $(grep ^Completed $outputdir/$test-$build.txt | perl -n -e '/^Completed.*in ([0-9]+)ms.*$/;print "$1,";' | perl -p -e 's/,$//g' ) >> $outputdir/$test.csv
#echo URL=https://ci.curoverse.com/view/job/arvados-api-server/ws/apps/workbench/log/$test-$build.txt/*view*/ >> $outputdir/$test.properties
else
echo "$test was't found on $file"
diff --git a/jenkins/run-tests.sh b/jenkins/run-tests.sh
index 39e01de..70fd1a3 100755
--- a/jenkins/run-tests.sh
+++ b/jenkins/run-tests.sh
@@ -135,7 +135,7 @@ report_outcomes() {
exit_cleanly() {
trap - INT
- ./create-plot-data-from-log.sh $BUILD_NUMBER "$WORKSPACE/apps/workbench/log/test.log" "$WORKSPACE/apps/workbench/log/"
+ create-plot-data-from-log.sh $BUILD_NUMBER "$WORKSPACE/apps/workbench/log/test.log" "$WORKSPACE/apps/workbench/log/"
rotate_logfile "$WORKSPACE/apps/workbench/log/" "test.log"
stop_services
rotate_logfile "$WORKSPACE/services/api/log/" "test.log"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list