-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
master is broken on Travis CI #1137
Comments
that looks like an error similar to this one: lukaslueg/built#14 |
ok, here's what I found out so far, every other test that doesn't fail is an executable like the
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs
index 24bb00f411..3031b5cfa5 100644
--- a/src/librustdoc/test.rs
+++ b/src/librustdoc/test.rs
@@ -329,7 +329,8 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
// environment to ensure that the target loads the right libraries at
// runtime. It would be a sad day if the *host* libraries were loaded as a
// mistake.
- let mut cmd = Command::new(&outdir.lock().unwrap().path().join("rust_out"));
+ let shie=&outdir.lock().unwrap().path().join("rust_out");
+ let mut cmd = Command::new(shie);
let var = DynamicLibrary::envvar();
let newpath = {
let path = env::var_os(var).unwrap_or(OsString::new());
@@ -338,6 +339,29 @@ fn run_test(test: &str, cratename: &str, filename: &FileName, line: usize,
env::join_paths(path).unwrap()
};
cmd.env(var, &newpath);
+ eprintln!("!! {:?}", shie);//cmd works but it's double quoted!
+ let blah=Command::new("/usr/bin/cp")
+ .arg("-af")
+ .arg(shie)
+ .arg("/tmp/ahaaaaa")
+ .output()
+ .expect("failed to execute process");
+// eprintln!("!! !{}!",String::from_utf8_lossy(&blah));
+ eprintln!("!! exitcode: !{}!",blah.status);
+ eprintln!("!! stdout: !{}!",String::from_utf8_lossy(&blah.stdout));
+ eprintln!("!! stderr: !{}!",String::from_utf8_lossy(&blah.stderr));
+ let blah=Command::new("/usr/bin/dirname")
+ .arg(shie)
+ .output()
+ .expect("failed dirname");
+ let blah=Command::new("/usr/bin/ls")
+ .arg("-la")
+ .arg(format!("{}",String::from_utf8_lossy(&blah.stdout)).trim())
+ .output()
+ .expect("failed ls");
+ eprintln!("!! exitcode: !{}!",blah.status);
+ eprintln!("!! stdout: !{}!",String::from_utf8_lossy(&blah.stdout));
+ eprintln!("!! stderr: !{}!",String::from_utf8_lossy(&blah.stderr));
match cmd.output() {
Err(e) => panic!("couldn't run the test: {}{}", e, |
It looks to me that the string but instead, it should somehow call But since I don't know how all of this works, hopefully someone who does could make the relevant changes in a rustc PR? if I'm even correct about the need for such changes. EDIT: So it turns out, there already exists a |
Ah, this looks like a legit rustdoc issue. Thanks for investigating, @xftroxgpx! Looks like if a doctest sets its crate name with an attribute, it will fail for the same reason. I've opened rust-lang/rust#57317 on rustdoc itself to track the issue upstream. |
…r=GuillaumeGomez rustdoc: force binary filename for compiled doctests Fixes rust-lang#57317, needed for rust-lang/rust-by-example#1137 Right now, when building a doctest, rustdoc provides the compiler an output directory (a temp dir) but lets the compiler name the executable. If the doctest needs to be executed, it then tries to run a binary named `rust_out` from that directory. For the most part, this works fine. However, if the doctest sets its own crate name, the compiler uses that name for the output binary instead. This causes rustdoc to try to execute a nonexistent binary, causing the test to fail. This PR changes the paths rustdoc gives to the compiler when building doctests to force the output *filename* instead of just the *directory*.
Now that rust-lang/rust#57338 is merged, the next nightly that comes out should be able to run that test. |
I can confirm that's working(all tests pass) with the stage1&2 rustc
|
thanks all! master is building again https://travis-ci.com/rust-lang/rust-by-example/builds/97132791 |
All builds are failing on master, not sure why though...
https://travis-ci.org/rust-lang/rust-by-example/builds/471278832
The text was updated successfully, but these errors were encountered: