Consistently use SWARMING_BOT_ID to determine if we are on a bot
Windows uses USERNAME, not USER. We no longer have the old bots, so no
need to support seeing if we are an old bot
This will make our windows bot actually figure out that it is a bot and not run
gradle in a daemon(doing some leaves hanging processes making the swarming bot
fail with infra failure)
Bug: 124643718
Change-Id: I38a58a92c1d011222ddbbdd6e92856fee36f60ca
diff --git a/tools/archive.py b/tools/archive.py
index 687844a..2c2b135 100755
--- a/tools/archive.py
+++ b/tools/archive.py
@@ -101,10 +101,6 @@
if not utils.is_bot() and not options.dry_run:
raise Exception('You are not a bot, don\'t archive builds')
- if utils.is_old_bot():
- print("Archiving is disabled on old bots.")
- return
-
PrintResourceInfo()
# Create maven release which uses a build that exclude dependencies.
create_maven_release.main(["--out", utils.LIBS])
diff --git a/tools/internal_test.py b/tools/internal_test.py
index 032f1fe..a9a90eb 100755
--- a/tools/internal_test.py
+++ b/tools/internal_test.py
@@ -193,9 +193,6 @@
print('\n\n%s had value:\n%s' % (to_print, value))
def run_bot():
- if utils.is_old_bot():
- print('Not running on on old bot, please see: https://ci.chromium.org/p/r8')
- return
print_magic_file_state()
# Ensure that there is nothing currently scheduled (broken/stopped run)
for magic in ALL_MAGIC:
diff --git a/tools/utils.py b/tools/utils.py
index ec830f2..27df3b5 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -504,14 +504,8 @@
android_optional_jar for android_optional_jar in android_optional_jars
if os.path.isfile(android_optional_jar)]
-def is_new_bot():
- return 'SWARMING_BOT_ID' in os.environ
-
-def is_old_bot():
- return 'BUILDBOT_SLAVENAME' in os.environ
-
def is_bot():
- return 'USER' in os.environ and os.environ['USER'] == 'chrome-bot'
+ return 'SWARMING_BOT_ID' in os.environ
def uncompressed_size(path):
return sum(z.file_size for z in zipfile.ZipFile(path).infolist())