- # Upload the toolchain before running the tests, in case the tests
- # fail. We do not want a flaky test or a non-toolchain-related bug to
- # cause us to lose the toolchain snapshot, especially since this takes
- # so long to build on Windows. We can always re-test a toolchain
- # snapshot on the trybots.
- echo @@@BUILD_STEP archive_build@@@
- (
- gsutil=../buildbot/gsutil.sh
- GS_BASE=gs://nativeclient-archive2/toolchain
- for destrevision in ${BUILDBOT_GOT_REVISION} latest ; do
- for suffix in tgz tgz.sha1hash ; do
- ${gsutil} cp -a public-read \
- naclsdk.${suffix} \
- ${GS_BASE}/${destrevision}/naclsdk_${PLATFORM}_x86.${suffix}
- done
+ GSD_BUCKET=nativeclient-archive2
+ UPLOAD_REV=${BUILDBOT_GOT_REVISION}
+else
+ GSD_BUCKET=nativeclient-trybot/packages
+ UPLOAD_REV=${BUILDBOT_BUILDERNAME}/${BUILDBOT_BUILDNUMBER}
+fi
+
+# Upload the toolchain before running the tests, in case the tests
+# fail. We do not want a flaky test or a non-toolchain-related bug to
+# cause us to lose the toolchain snapshot, especially since this takes
+# so long to build on Windows. We can always re-test a toolchain
+# snapshot on the trybots.
+echo @@@BUILD_STEP archive_build@@@
+(
+ gsutil=../buildbot/gsutil.sh
+ GS_BASE=gs://${GSD_BUCKET}/toolchain
+ for destrevision in ${UPLOAD_REV} latest ; do
+ for suffix in tgz tgz.sha1hash ; do
+ ${gsutil} cp -a public-read \
+ naclsdk.${suffix} \
+ ${GS_BASE}/${destrevision}/naclsdk_${PLATFORM}_x86.${suffix}