diff options
author | 2015-08-12 15:02:24 +0000 | |
---|---|---|
committer | 2015-08-12 15:24:46 +0000 | |
commit | 4c5eb0ff6540f7e90fbad3a04053699840163477 (patch) | |
tree | 4998c967994d309890347a90caeff055a37f7845 /src/main/java/com/google/devtools/build/lib/runtime | |
parent | f4b07dbdb4bf5d4ae2b743d50f8e43ff49770987 (diff) |
Allow runtime introspection of a content hash of the Blaze binary and all embedded binaries.
--
MOS_MIGRATED_REVID=100476182
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java | 3 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java index 8225fce736..3a4f3e1d90 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java @@ -1469,7 +1469,8 @@ public final class BlazeRuntime { } BlazeDirectories directories = - new BlazeDirectories(installBasePath, outputBasePath, workspaceDirectoryPath); + new BlazeDirectories(installBasePath, outputBasePath, workspaceDirectoryPath, + startupOptions.installMD5); Clock clock = BlazeClock.instance(); diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java index 120ab946ed..59119ddcf0 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeServerStartupOptions.java @@ -82,6 +82,16 @@ public class BlazeServerStartupOptions extends OptionsBase { help = "This launcher option is intended for use only by tests.") public PathFragment installBase; + /* + * The installation MD5 - a content hash of the blaze binary (includes the Blaze deploy JAR and + * any other embedded binaries - anything that ends up in the install_base). + */ + @Option(name = "install_md5", + defaultValue = "", // NOTE: purely decorative! See class docstring. + category = "hidden", + help = "This launcher option is intended for use only by tests.") + public String installMD5; + /* Note: The help string in this option applies to the client code; not * the server code. The server code will only accept a non-empty path; it's * the responsibility of the client to compute a proper default if |