diff options
| author | kennytm <kennytm@gmail.com> | 2017-12-22 01:16:21 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2017-12-27 00:00:46 +0800 |
| commit | 44954ab52d82fe5ae5222c3bfd482d38c3db0baa (patch) | |
| tree | d9dee3177bf9a289fb87a7a43f33bcb9c9cea3ad /src/bootstrap | |
| parent | d7488c308963ddc98811cafc95f75cd1647baf0a (diff) | |
| download | rust-44954ab52d82fe5ae5222c3bfd482d38c3db0baa.tar.gz rust-44954ab52d82fe5ae5222c3bfd482d38c3db0baa.zip | |
Clarify toolstate names. Move publish.py to a more convenient location.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/check.rs | 8 | ||||
| -rw-r--r-- | src/bootstrap/tool.rs | 4 | ||||
| -rw-r--r-- | src/bootstrap/toolstate.rs | 9 |
3 files changed, 11 insertions, 10 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index 79a6a39d546..714c01aa504 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -256,7 +256,7 @@ impl Step for Rls { builder.add_rustc_lib_path(compiler, &mut cargo); if try_run(build, &mut cargo) { - build.save_toolstate("rls", ToolState::Testing); + build.save_toolstate("rls", ToolState::TestPass); } } } @@ -302,7 +302,7 @@ impl Step for Rustfmt { builder.add_rustc_lib_path(compiler, &mut cargo); if try_run(build, &mut cargo) { - build.save_toolstate("rustfmt", ToolState::Testing); + build.save_toolstate("rustfmt", ToolState::TestPass); } } } @@ -352,7 +352,7 @@ impl Step for Miri { builder.add_rustc_lib_path(compiler, &mut cargo); if try_run(build, &mut cargo) { - build.save_toolstate("miri", ToolState::Testing); + build.save_toolstate("miri", ToolState::TestPass); } } else { eprintln!("failed to test miri: could not build"); @@ -407,7 +407,7 @@ impl Step for Clippy { builder.add_rustc_lib_path(compiler, &mut cargo); if try_run(build, &mut cargo) { - build.save_toolstate("clippy-driver", ToolState::Testing); + build.save_toolstate("clippy-driver", ToolState::TestPass); } } else { eprintln!("failed to test clippy: could not build"); diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 16e8b025b08..ea055cb5d1b 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -116,9 +116,9 @@ impl Step for ToolBuild { let mut cargo = prepare_tool_cargo(builder, compiler, target, "build", path); let is_expected = build.try_run(&mut cargo); build.save_toolstate(tool, if is_expected { - ToolState::Compiling + ToolState::TestFail } else { - ToolState::Broken + ToolState::BuildFail }); if !is_expected { diff --git a/src/bootstrap/toolstate.rs b/src/bootstrap/toolstate.rs index 3c490044e4e..f63c1988906 100644 --- a/src/bootstrap/toolstate.rs +++ b/src/bootstrap/toolstate.rs @@ -9,19 +9,20 @@ // except according to those terms. #[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)] +#[serde(rename_all = "kebab-case")] /// Whether a tool can be compiled, tested or neither pub enum ToolState { /// The tool compiles successfully, but the test suite fails - Compiling = 1, + TestFail = 1, /// The tool compiles successfully and its test suite passes - Testing = 2, + TestPass = 2, /// The tool can't even be compiled - Broken = 0, + BuildFail = 0, } impl Default for ToolState { fn default() -> Self { // err on the safe side - ToolState::Broken + ToolState::BuildFail } } |
