[autotest] Delay getting useflags only when needed.

It takes over 30s to get useflags. This adds unnecessary overhead for CLs that
do not have changes in control files. This change delays getting useflags.

BUG=None
TEST=repo upload this CL takes less than 10s.
manually pass some control file for the script to check, make sure useflags
still works.

Change-Id: I39b4cfbd8135c99a6046975f8564522720300dd3
Reviewed-on: https://chromium-review.googlesource.com/310546
Commit-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
1 file changed