-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hack to get the tests to work. see rust-lang/cargo#879
- Loading branch information
Showing
2 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
extern crate capnpc; | ||
|
||
fn main() { | ||
::capnpc::compile(Path::new("."), [Path::new("test.capnp")]); | ||
|
||
// See https://github.com/rust-lang/cargo/issues/879 | ||
//::capnpc::compile(Path::new("."), [Path::new("test.capnp")]); | ||
|
||
let mut command = ::std::io::Command::new("capnp"); | ||
command | ||
.arg("compile") | ||
.arg("-o/bin/cat") | ||
.arg("test.capnp"); | ||
|
||
command.stdout(::std::io::process::CreatePipe(false, true)); | ||
|
||
match command.spawn() { | ||
Ok(ref mut p) => { | ||
let mut child_stdout = p.stdout.take().unwrap(); | ||
::capnpc::codegen::main(&mut child_stdout).unwrap(); | ||
p.wait().unwrap(); | ||
} | ||
Err(e) => { | ||
panic!("could not start process: {}", e); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters