about summary refs log tree commit diff
path: root/src/bootstrap/build/doc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/build/doc.rs')
-rw-r--r--src/bootstrap/build/doc.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bootstrap/build/doc.rs b/src/bootstrap/build/doc.rs
index d8b02dce222..50c0c56807b 100644
--- a/src/bootstrap/build/doc.rs
+++ b/src/bootstrap/build/doc.rs
@@ -122,6 +122,22 @@ pub fn std(build: &Build, stage: u32, host: &str, out: &Path) {
     cp_r(&out_dir, out)
 }
 
+pub fn test(build: &Build, stage: u32, host: &str, out: &Path) {
+    println!("Documenting stage{} test ({})", stage, host);
+    let compiler = Compiler::new(stage, host);
+    let out_dir = build.stage_out(&compiler, Mode::Libtest)
+                       .join(host).join("doc");
+    let rustdoc = build.rustdoc(&compiler);
+
+    build.clear_if_dirty(&out_dir, &rustdoc);
+
+    let mut cargo = build.cargo(&compiler, Mode::Libtest, host, "doc");
+    cargo.arg("--manifest-path")
+         .arg(build.src.join("src/rustc/test_shim/Cargo.toml"));
+    build.run(&mut cargo);
+    cp_r(&out_dir, out)
+}
+
 pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) {
     println!("Documenting stage{} compiler ({})", stage, host);
     let compiler = Compiler::new(stage, host);