Skip to content
This repository has been archived by the owner on Dec 29, 2021. It is now read-only.

main_binary's stderr may include extra text #79

Closed
epage opened this issue Jan 3, 2018 · 3 comments
Closed

main_binary's stderr may include extra text #79

epage opened this issue Jan 3, 2018 · 3 comments

Comments

@epage
Copy link
Collaborator

epage commented Jan 3, 2018

  • assert_cli version: 0.5.4
  • Rust version: 1.22
  • OS and version: Windows

By default, cargo test runs tests in parallel. When two tests invoke main_binary in parallel, cargo will block until the other instance of cargo is finished.

Unfortunately, it seems that cargo prints Blocking waiting for file lock on build directory to stderr, even with --quiet, or at least that is what I'm assuming is going wrong in cobalt-org/cobalt.rs#352

@epage
Copy link
Collaborator Author

epage commented Jan 3, 2018

See #51 for a discussion on alternative ways of finding the test binary.

One workaround for this issue is to serialize the tests. This gets annoying for random contributors because they won't know of the requirement.

One workaround is requires more advanced stderr matching for clients to choose to detect and ignore this text.

@epage
Copy link
Collaborator Author

epage commented Jan 3, 2018

Should cargo printing this despite --quiet be a bug?

epage added a commit to epage/assert_cli that referenced this issue May 25, 2018
This switches us from using `cargo run` to `cargo build`, reading where
the binary is placed, and callin that instead.

Fixes assert-rs#95 because the user changing the `CWD` doesn't impact `cargo
build`.

Fixes assert-rs#79 because there is no `cargo` output when capturing the user's
stdout/stderr.

Fixes assert-rs#51 because the user changing the environment doesn't impact
`cargo build`.

This is a step towards working around assert-rs#100 because we can allow a user
to cache the result of `cargo build`.
@epage
Copy link
Collaborator Author

epage commented May 29, 2018

Addressed in assert_cmd
https://github.com/assert-rs/assert_cmd
assert_cli is going to morph into a wider-focused tool, including things like assert_fs. See #41

@epage epage closed this as completed May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant