From 9c5f0b160576ac33147b7386ffe15b01a54eb4dc Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 18 Feb 2016 15:00:07 -0800 Subject: [PATCH 1/3] Move Node JUnit reports.xml to repo root --- tools/run_tests/run_node.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index 178584ae8ed..fb84b79e7fc 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -44,6 +44,7 @@ root=`pwd` test_directory='src/node/test' timeout=8000 + if [ "$CONFIG" = "gcov" ] then ./node_modules/.bin/istanbul cover --dir reports/node_coverage \ @@ -58,7 +59,7 @@ then echo '' > \ ../reports/node_coverage/index.html else - JUNIT_REPORT_PATH=src/node/reports.xml JUNIT_REPORT_STACK=1 \ + JUNIT_REPORT_PATH=reports.xml JUNIT_REPORT_STACK=1 \ ./node_modules/.bin/mocha --timeout $timeout \ --reporter mocha-jenkins-reporter $test_directory fi From b46672602965727de647a720b6cc3f3dca436a11 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 18 Feb 2016 15:35:56 -0800 Subject: [PATCH 2/3] Extract reports.xml files from docker images in reports.zip --- tools/jenkins/build_docker_and_run_tests.sh | 5 ----- tools/jenkins/docker_run_tests.sh | 1 + tools/run_tests/run_node.sh | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/jenkins/build_docker_and_run_tests.sh index e2ac7518f09..0ddf261032c 100755 --- a/tools/jenkins/build_docker_and_run_tests.sh +++ b/tools/jenkins/build_docker_and_run_tests.sh @@ -82,11 +82,6 @@ docker run \ $DOCKER_IMAGE_NAME \ bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || DOCKER_FAILED="true" -if [ "$XML_REPORT" != "" ] -then - docker cp "$CONTAINER_NAME:/var/local/git/grpc/$XML_REPORT" $git_root || true -fi - docker cp "$CONTAINER_NAME:/var/local/git/grpc/reports.zip" $git_root || true unzip -o $git_root/reports.zip -d $git_root || true rm -f reports.zip diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 282b8573511..578bda170ae 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -60,5 +60,6 @@ echo '' >> index.html cd .. zip -r reports.zip reports +find . -name reports.xml | xargs zip reports.xml exit $exit_code diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index fb84b79e7fc..178584ae8ed 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -44,7 +44,6 @@ root=`pwd` test_directory='src/node/test' timeout=8000 - if [ "$CONFIG" = "gcov" ] then ./node_modules/.bin/istanbul cover --dir reports/node_coverage \ @@ -59,7 +58,7 @@ then echo '' > \ ../reports/node_coverage/index.html else - JUNIT_REPORT_PATH=reports.xml JUNIT_REPORT_STACK=1 \ + JUNIT_REPORT_PATH=src/node/reports.xml JUNIT_REPORT_STACK=1 \ ./node_modules/.bin/mocha --timeout $timeout \ --reporter mocha-jenkins-reporter $test_directory fi From 9ddd46587827cd0498b67a3972ec9c263ba393ab Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 18 Feb 2016 15:39:18 -0800 Subject: [PATCH 3/3] Fixed zip file name --- tools/jenkins/docker_run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 578bda170ae..2e40f8fd65a 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -60,6 +60,6 @@ echo '' >> index.html cd .. zip -r reports.zip reports -find . -name reports.xml | xargs zip reports.xml +find . -name reports.xml | xargs zip reports.zip exit $exit_code