diff options
| author | kennytm <kennytm@gmail.com> | 2018-07-03 05:53:18 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-07-03 05:53:18 +0800 |
| commit | 20231d774bcda2d6f9bd52fe402fd22f2d22d223 (patch) | |
| tree | e254a6c50ac2077333ea23d6737517146ac38551 /src/bootstrap | |
| parent | d91457495b2f551e34ecbe1111885d6ccceceb15 (diff) | |
| download | rust-20231d774bcda2d6f9bd52fe402fd22f2d22d223.tar.gz rust-20231d774bcda2d6f9bd52fe402fd22f2d22d223.zip | |
Fixed detection of test-fail for doctests.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/test.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 90688b1c0e1..3adfbb5e36b 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1269,17 +1269,15 @@ impl Step for DocTest { files.sort(); + let mut toolstate = ToolState::TestPass; for file in files { - let test_result = markdown_test(builder, compiler, &file); - if self.is_ext_doc { - let toolstate = if test_result { - ToolState::TestPass - } else { - ToolState::TestFail - }; - builder.save_toolstate(self.name, toolstate); + if !markdown_test(builder, compiler, &file) { + toolstate = ToolState::TestFail; } } + if self.is_ext_doc { + builder.save_toolstate(self.name, toolstate); + } } } |
