summaryrefslogtreecommitdiffhomepage
path: root/scripts/common_build.sh
diff options
context:
space:
mode:
authorBrad Burlage <brb@google.com>2020-02-24 14:21:18 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-24 14:22:32 -0800
commitededa90d07e4df3eb3fe8a52a0afbcdaf82e8df5 (patch)
tree01aede8b7e8592df0ceb1803ddb53337366160f7 /scripts/common_build.sh
parentc37b196455e8b3816298e3eea98e4ee2dab8d368 (diff)
Internal change.
PiperOrigin-RevId: 296972565
Diffstat (limited to 'scripts/common_build.sh')
-rwxr-xr-xscripts/common_build.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/common_build.sh b/scripts/common_build.sh
index ae8b67383..3be0bb21c 100755
--- a/scripts/common_build.sh
+++ b/scripts/common_build.sh
@@ -70,7 +70,9 @@ 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
- ls -l $d/shard_*_of_*/test.outputs/outputs.zip && zip -r -1 $d/outputs.zip $d/shard_*_of_*/test.outputs/outputs.zip
+ 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
+ fi
done
find -L "bazel-testlogs" -name 'shard_*_of_*' | xargs rm -rf
# Move test logs to Kokoro directory. tar is used to conveniently perform
@@ -90,7 +92,13 @@ function collect_logs() {
echo " gsutil cp gs://gvisor/logs/${KOKORO_BUILD_ARTIFACTS_SUBDIR}/${archive} /tmp"
echo " https://storage.cloud.google.com/gvisor/logs/${KOKORO_BUILD_ARTIFACTS_SUBDIR}/${archive}"
fi
- tar --create --gzip --file="${KOKORO_ARTIFACTS_DIR}/${archive}" -C "${RUNSC_LOGS_DIR}" .
+ time tar \
+ --verbose \
+ --create \
+ --gzip \
+ --file="${KOKORO_ARTIFACTS_DIR}/${archive}" \
+ --directory "${RUNSC_LOGS_DIR}" \
+ .
fi
fi
fi