Skip to content
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

Tests are broken #2

Closed
pinpox opened this issue Jan 10, 2023 · 5 comments
Closed

Tests are broken #2

pinpox opened this issue Jan 10, 2023 · 5 comments

Comments

@pinpox
Copy link

pinpox commented Jan 10, 2023

Hi, I'm packaging this application for nixpkgs, but the tests are failing.

❯ cargo test
   Compiling mdbook-cmdrun v0.4.0 (/home/pinpox/code/github.com/FauconFan/mdbook-cmdrun)
    Finished test [unoptimized + debuginfo] target(s) in 2.06s
     Running unittests src/lib.rs (target/debug/deps/mdbook_cmdrun-cf6d60e16bd57cd3)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/main.rs (target/debug/deps/mdbook_cmdrun-02eb7087b57c49c8)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/book.rs (target/debug/deps/book-a79d83d2bdf49cb6)

running 1 test
test build_test_book ... FAILED

failures:

---- build_test_book stdout ----
thread 'build_test_book' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', tests/book.rs:10:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    build_test_book

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass `--test book`

I could skip the tests as a workaround, but you might want to look into it.

@FauconFan
Copy link
Owner

Hi! ty for opening this issue! Unfortunately, I wasn't able to reproduce the failing tests. Locally and on GitHub Actions. Tests went fine. Do you still have the issue?

@FauconFan
Copy link
Owner

Up

@pinpox
Copy link
Author

pinpox commented Mar 7, 2023

Sorry for the late reply. Yes, the error is still there.

I ran cargo test in the root of the repository and get this error:

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running unittests src/main.rs (target/debug/deps/mdbook_cmdrun-254a8cdd668f0b2c)

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/book.rs (target/debug/deps/book-08f5c45e60047179)

running 1 test
test build_test_book ... FAILED

failures:

---- build_test_book stdout ----
thread 'build_test_book' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', tests/book.rs:10:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    build_test_book

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass `--test book`

It complains about this line:

.current_dir(fs::canonicalize("./tests/book/").unwrap())

@FauconFan
Copy link
Owner

Unfortunately, I'm not able to reproduce your problem. Can you share more about your use case? I'm pretty sure it is a problem you had, because everything looks fine on the repo side. If you don't specify additionnal information, I'll close this comment.

@FauconFan
Copy link
Owner

Hello, I'll close this then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants