[build] Delete/inline constants
These variables are all either no longer used, or no longer part of the
platform/infra interface. For example, "fuchsia-buildstats.json" is now
just a name for a temporary file so we can inline it.
Bug: 67861
Change-Id: I2d4175b930c6436f9e48895309702e4773c38801
Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/recipes/+/515761
Reviewed-by: Gary Boone <gboone@google.com>
Fuchsia-Auto-Submit: Oliver Newman <olivernewman@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/recipe_modules/build/api.py b/recipe_modules/build/api.py
index 9597cd6..bff781a 100644
--- a/recipe_modules/build/api.py
+++ b/recipe_modules/build/api.py
@@ -34,10 +34,6 @@
FINT_BUILD_ARTIFACTS = "build_artifacts.json"
# Manifests produced by the build.
-ARCHIVES_JSON = "archives.json"
-IMAGES_JSON = "images.json"
-PREBUILT_BINARIES_JSON = "prebuilt_binaries.json"
-TESTS_JSON = "tests.json"
TOOL_PATHS_JSON = "tool_paths.json"
TRIAGE_SOURCES_JSON = "triage_sources.json"
@@ -57,25 +53,10 @@
# The name of the public key file uploaded in release builds.
RELEASE_PUBKEY_FILENAME = "publickey.pem"
-QEMU_IMAGES = ("qemu-kernel", "zircon-a")
-
# Name of compdb generated by GN, it is expected in the root of the build
# directory.
GN_COMPDB_FILENAME = "compile_commands.json"
-# Name of Ninja Build metadata directory. Group build metadata files in a
-# directory so they don't accidentally overwrite other files in build root, for
-# example Ninja's compdb share the same name with GN's.
-BUILDMETADATA_DIR = "ninja_build_metadata"
-# Name of Ninja Build metadata files.
-NINJA_COMPDB_FILENAME = "compile_commands.json"
-NINJA_GRAPH_FILENAME = "graph.dot"
-NINJA_LOG_FILENAME = ".ninja_log"
-BUILDMETADATA_FILENAME = "fuchsia-buildstats.json"
-
-# GN tracelogs, located in the root of the fuchsia build output directory.
-FUCHSIA_GN_TRACE = "gn_trace.json"
-
class NoSuchTool(Exception):
def __init__(self, name, cpu, os):
@@ -212,6 +193,7 @@
presentation.logs["size_checker JSON output"] = sizes_json
raise self._api.step.StepFailure("binary size checks failed")
+ # TODO(olivernewman): Move affected test calculation into `fint build`.
def calculate_affected_tests(self, bb_input):
"""Returns (path of affected tests, whether all testing can be skipped)."""
no_work = False
@@ -233,7 +215,7 @@
+ changed_files
+ [
"--tests-json",
- self.gn_results.test_manifest_filename,
+ self.build_dir.join("tests.json"),
"--ninja",
self.tool("ninja"),
]
@@ -323,11 +305,6 @@
"""The path to a GN trace file produced by `fint set`."""
return self.fint_set_artifacts.gn_trace_path
- @property
- def test_manifest_filename(self):
- """Returns the filename of the test manifest generated by GN."""
- return self.build_dir.join(TESTS_JSON)
-
@cached_property
def generated_sources(self):
"""Returns the generated source files (list(str)) from the fuchsia build.
@@ -1031,7 +1008,8 @@
# building the buildstats tool.
raise Exception("The build did not produce the buildstats tool")
- output_path = self.m.path.mkdtemp("buildstats").join(BUILDMETADATA_FILENAME)
+ output_name = "fuchsia-buildstats.json"
+ output_path = self.m.path.mkdtemp("buildstats").join(output_name)
command = [
buildstats_binary_path,
"--ninjalog",
@@ -1049,7 +1027,7 @@
self.m.upload.file_to_gcs(
source=output_path,
bucket=gcs_bucket,
- subpath=BUILDMETADATA_FILENAME,
+ subpath=output_name,
namespace=build_id,
)