Skip to content

Commit

Permalink
add detection for doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
Freax13 committed Apr 17, 2020
1 parent 4e16502 commit 293f7da
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/subcommand/runner.rs
Expand Up @@ -9,7 +9,13 @@ pub(crate) fn runner(args: RunnerArgs) -> Result<i32, ErrorMessage> {
.executable
.parent()
.ok_or("kernel executable has no parent")?;
let is_test = exe_parent.ends_with("deps");
let is_doctest = exe_parent
.file_name()
.ok_or("kernel executable's parent has no file name")?
.to_str()
.ok_or("kernel executable's parent file name is not valid UTF-8")?
.starts_with("rustdoctest");
let is_test = is_doctest || exe_parent.ends_with("deps");

let bootimage_bin = {
let file_stem = args
Expand Down

0 comments on commit 293f7da

Please sign in to comment.