From 23b42a86c646eed10830b4b34ec46173728140d0 Mon Sep 17 00:00:00 2001 From: Nico Cesar Date: Wed, 20 May 2015 11:43:31 -0400 Subject: [PATCH] 6061: plot data 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 | 26 +++++++++++++------------- jenkins/run-tests.sh | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/jenkins/create-plot-data-from-log.sh b/jenkins/create-plot-data-from-log.sh index 60516a5..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 @@ -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 diff --git a/jenkins/run-tests.sh b/jenkins/run-tests.sh index 375c4e0..70fd1a3 100755 --- a/jenkins/run-tests.sh +++ b/jenkins/run-tests.sh @@ -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 } -- 2.30.2