6061: plot data
authorNico Cesar <nico@nicocesar.com>
Wed, 20 May 2015 15:43:31 +0000 (11:43 -0400)
committerNico Cesar <nico@nicocesar.com>
Thu, 21 May 2015 15:31:22 +0000 (11:31 -0400)
added create plot data script to exit_cleanly()
3 initial test to use
Matching more generic test names

refs #6061

jenkins/create-plot-data-from-log.sh
jenkins/run-tests.sh

index 60516a57e0b1bc4a77e6ccbc7a9644d1c31b6bb6..26fd655a522341bebb1c61ec8fe3c6a933e1cb0c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash 
+#!/bin/bash -x
 
 build=$1
 file=$2
@@ -36,19 +36,19 @@ MAXLINES=1000
 ## TODO: check $build and $file make sense
 
 for test in \
- test_Collection_page_renders_name \
- test_combine_selected_collections_into_new_collection \
- test_combine_selected_collection_files_into_new_collection_active_foo_collection_in_aproject_true \
- test_combine_selected_collection_files_into_new_collection_active_foo_file_false \
- test_combine_selected_collection_files_into_new_collection_project_viewer_foo_collection_in_aproject_false \
- test_combine_selected_collection_files_into_new_collection_project_viewer_foo_file_false \
  test_Create_and_show_large_collection_with_manifest_text_of_20000000 \
- test_Create__show__and_update_description_for_large_collection_with_manifest_text_of_100000 \
+ 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 -A$MAXLINES "^CollectionsTest: $test" $file | tail --lines=+3|grep -B$MAXLINES -E "^-*$" -m1 > $outputdir/$test-$build.txt
- 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 URL=https://ci.curoverse.com/view/job/arvados-api-server/ws/apps/workbench/log/$test-$build.txt/*view*/ >>  $outputdir/$test.properties
+(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 $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"
+ fi
 done
index 375c4e073fd37baa6a8c91e766a54da6a4935d0d..70fd1a30cebac89bef51d3aba7933b285cba36c1 100755 (executable)
@@ -135,6 +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/"
     rotate_logfile "$WORKSPACE/apps/workbench/log/" "test.log"
     stop_services
     rotate_logfile "$WORKSPACE/services/api/log/" "test.log"
@@ -190,7 +191,6 @@ rotate_logfile() {
   if [[ -f "$1/$2" ]]; then
     THEDATE=`date +%Y%m%d%H%M%S`
     mv "$1/$2" "$1/$THEDATE-$BUILD_NUMBER-$2"
-    ./create-plot-data-from-log.sh $BUILD_NUMBER "$1/$THEDATE-$BUILD_NUMBER-$2" "$1"
     gzip "$1/$THEDATE-$BUILD_NUMBER-$2"
   fi
 }