diff options
| author | bors <bors@rust-lang.org> | 2015-12-03 23:09:30 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-12-03 23:09:30 +0000 |
| commit | c7d58321e1856396d4b5b047c1844d6494a5d5c4 (patch) | |
| tree | 8b997a1e442b2eefe3cde1fec2df1db97c4908cc | |
| parent | 372e82c9c048c0afff1b702d3969a08cad5d26b7 (diff) | |
| parent | af1ad419e154b5306c7d89b21218fe35607e9f3a (diff) | |
Auto merge of #30149 - mitaa:fqn, r=alexcrichton
Fixes #30109
| -rw-r--r-- | src/compiletest/header.rs | 12 | ||||
| -rw-r--r-- | src/compiletest/runtest.rs | 25 | ||||
| -rw-r--r-- | src/librustc/middle/cstore.rs | 2 | ||||
| -rw-r--r-- | src/librustc_metadata/csearch.rs | 18 | ||||
| -rw-r--r-- | src/librustdoc/clean/inline.rs | 2 | ||||
| -rw-r--r-- | src/test/auxiliary/issue-30109-1.rs | 11 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-30109.rs | 24 |
7 files changed, 84 insertions, 10 deletions
diff --git a/src/compiletest/header.rs b/src/compiletest/header.rs index 9de46cef745..6efe6e608e8 100644 --- a/src/compiletest/header.rs +++ b/src/compiletest/header.rs @@ -34,6 +34,8 @@ pub struct TestProps { pub exec_env: Vec<(String,String)> , // Lines to check if they appear in the expected debugger output pub check_lines: Vec<String> , + // Build documentation for all specified aux-builds as well + pub build_aux_docs: bool, // Flag to force a crate to be built with the host architecture pub force_host: bool, // Check stdout for error-pattern output as well as stderr @@ -59,6 +61,7 @@ pub fn load_props(testfile: &Path) -> TestProps { let mut run_flags = None; let mut pp_exact = None; let mut check_lines = Vec::new(); + let mut build_aux_docs = false; let mut force_host = false; let mut check_stdout = false; let mut no_prefer_dynamic = false; @@ -83,6 +86,10 @@ pub fn load_props(testfile: &Path) -> TestProps { pp_exact = parse_pp_exact(ln, testfile); } + if !build_aux_docs { + build_aux_docs = parse_build_aux_docs(ln); + } + if !force_host { force_host = parse_force_host(ln); } @@ -144,6 +151,7 @@ pub fn load_props(testfile: &Path) -> TestProps { aux_builds: aux_builds, exec_env: exec_env, check_lines: check_lines, + build_aux_docs: build_aux_docs, force_host: force_host, check_stdout: check_stdout, no_prefer_dynamic: no_prefer_dynamic, @@ -284,6 +292,10 @@ fn parse_force_host(line: &str) -> bool { parse_name_directive(line, "force-host") } +fn parse_build_aux_docs(line: &str) -> bool { + parse_name_directive(line, "build-aux-docs") +} + fn parse_check_stdout(line: &str) -> bool { parse_name_directive(line, "check-stdout") } diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 8042e2f966c..833ab553a13 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -1149,11 +1149,20 @@ fn compile_test(config: &Config, props: &TestProps, } fn document(config: &Config, props: &TestProps, - testfile: &Path) -> (ProcRes, PathBuf) { + testfile: &Path, out_dir: &Path) -> ProcRes { + if props.build_aux_docs { + for rel_ab in &props.aux_builds { + let abs_ab = config.aux_base.join(rel_ab); + let aux_props = header::load_props(&abs_ab); + + let auxres = document(config, &aux_props, &abs_ab, out_dir); + if !auxres.status.success() { + return auxres; + } + } + } + let aux_dir = aux_output_dir_name(config, testfile); - let out_dir = output_base_name(config, testfile); - let _ = fs::remove_dir_all(&out_dir); - ensure_dir(&out_dir); let mut args = vec