Han-Wen Nienhuys | d08b27f | 2015-02-25 16:45:20 +0100 | [diff] [blame] | 1 | // Copyright 2014 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package com.google.devtools.build.lib.runtime; |
| 16 | |
| 17 | /** |
| 18 | * Represents how far into the build a given target has gone. |
| 19 | * Used primarily for master log status reporting and representation. |
| 20 | */ |
| 21 | public enum BuildPhase { |
| 22 | PARSING("parsing-failed", false), |
| 23 | LOADING("loading-failed", false), |
| 24 | ANALYSIS("analysis-failed", false), |
| 25 | TEST_FILTERING("test-filtered", true), |
| 26 | TARGET_FILTERING("target-filtered", true), |
| 27 | NOT_BUILT("not-built", false), |
| 28 | NOT_ANALYZED("not-analyzed", false), |
| 29 | EXECUTION("build-failed", false), |
| 30 | BLAZE_HALTED("blaze-halted", false), |
| 31 | COMPLETE("built", true); |
| 32 | |
| 33 | private final String msg; |
| 34 | private final boolean success; |
| 35 | |
| 36 | BuildPhase(String msg, boolean success) { |
| 37 | this.msg = msg; |
| 38 | this.success = success; |
| 39 | } |
| 40 | |
| 41 | public String getMessage() { |
| 42 | return msg; |
| 43 | } |
| 44 | |
| 45 | public boolean getSuccess() { |
| 46 | return success; |
| 47 | } |
| 48 | } |