summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2020-04-24 12:51:37 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-24 12:52:49 -0700
commitf87964e829f438175edcc0264adc7ce7b3d83842 (patch)
tree3b84974e953703a5e6797a5ebadee078e72d31cd
parent1ceee045294a6059093851645968f5a7e00a58f3 (diff)
kokoro: save all files from test.outputs/
If a test fails by timeout, bazel doesn't generate outputs.zip. PiperOrigin-RevId: 308307815
-rwxr-xr-xscripts/common_build.sh4
1 files 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