format: gn: switch to pinned version

We don't want to hit the network everytime we format a gn file.
Also cache it for tests.

BUG=b:187792105
TEST=CQ passes

Change-Id: I7e0f7ce008db634fd704a9822b8c7d6a9af4a6e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4370660
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Cindy Lin <xcl@google.com>
Reviewed-by: Cindy Lin <xcl@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/run_tests.py b/scripts/run_tests.py
index e1a32c7..bb27ebd 100644
--- a/scripts/run_tests.py
+++ b/scripts/run_tests.py
@@ -97,6 +97,7 @@
 def precache():
     """Do some network-dependent stuff before we disallow network access."""
     # pylint: disable=protected-access
+    logging.notice("Caching tools from network (cipd/vpython/etc...)")
 
     # This is a cheesy hack to make sure gsutil is populated in the cache before
     # we run tests. This is a partial workaround for crbug.com/468838.
@@ -114,6 +115,7 @@
         [os.path.join(constants.CHROMITE_DIR, "scripts", "isort"), "--version"],
         capture_output=True,
     )
+    formatters.gn._find_gn()
     formatters.star._find_buildifier()
     formatters.textproto._find_txtpbfmt()
     with clang_format.ClangFormat():