From f87964e829f438175edcc0264adc7ce7b3d83842 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 24 Apr 2020 12:51:37 -0700 Subject: kokoro: save all files from test.outputs/ If a test fails by timeout, bazel doesn't generate outputs.zip. PiperOrigin-RevId: 308307815 --- scripts/common_build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/common_build.sh b/scripts/common_build.sh index 3be0bb21c..4fe1067d2 100755 --- a/scripts/common_build.sh +++ b/scripts/common_build.sh @@ -70,8 +70,8 @@ function collect_logs() { for d in `find -L "bazel-testlogs" -name 'shard_*_of_*' | xargs dirname | sort | uniq`; do junitparser merge `find $d -name test.xml` $d/test.xml cat $d/shard_*_of_*/test.log > $d/test.log - if ls -l $d/shard_*_of_*/test.outputs/outputs.zip 2>/dev/null; then - zip -r -1 "$d/outputs.zip" $d/shard_*_of_*/test.outputs/outputs.zip + if ls -ld $d/shard_*_of_*/test.outputs 2>/dev/null; then + zip -r -1 "$d/outputs.zip" $d/shard_*_of_*/test.outputs fi done find -L "bazel-testlogs" -name 'shard_*_of_*' | xargs rm -rf -- cgit v1.2.3