Determine if the build is in presubmit using build id

The current logic to determine if a build is pre or postsubmit is the
existence of the change_info file but this file also exists in
postsubmit, causing the build to break. Use the build ID as the
heuristic instead which should be more reliable.

Test: abtd run
Bug: 314171817
Change-Id: I9871eee71c0574583b528135dadd42e3f485a780
This commit is contained in:
Luca Farsi 2024-01-22 14:56:13 -08:00
parent 3b7d46f4ca
commit c18da79d3f

View File

@ -39,7 +39,7 @@ REQUIRED_MODULES = frozenset(
def build_test_suites(argv):
args = parse_args(argv)
if not args.change_info:
if not os.environ.get('BUILD_NUMBER')[0] == 'P':
build_everything(args)
return