Comments (6)
I think I missed the update on which crate. It looks like you are using assert_cmd
for unit/whitebox tests (in src/
), rather than integration/blackbox tests (in tests/
). I do not believe the binary is guaranteed to be compiled at that. When not overriding the directory, I think it works just because something else had left behind an executable.
This is documented in the limitations
Going ahead and closing assuming this is the root cause. Feel free to ask for this to be re-opened if something still needs addressing.
from assert_cmd.
Thanks for reporting this!
A workaround would be to use escargot
to get the binary.
I might not have time for a couple of days to dig into this if you weren't planning to. Is this blocking you or is that workaround insufficient until then?
And apparently, there are some broken links in the docs, so I created #118
from assert_cmd.
Is this blocking you or is that workaround insufficient until then?
This is not blocking me at all for now, no worries. I disabled my tests for now but I will be happy to enable them again :)
from assert_cmd.
I wonder if there is a platform or rustc specific aspect to this.
I just ran
assert_cmd $ TMPDIR=/Users/edpage/src/tmp/ CARGO_TARGET_DIR=/Users/edpage/src/tmp/ cargo test
(the TMPDIR is to workaround an IT thing)
assert_cmd
on a Mac with 1.51.0 passes tests that lookup and run a binary included in assert_cmd
(bin_fixture
).
from assert_cmd.
Either way, I expect #120 to help
from assert_cmd.
Either way, I expect #120 to help
It may help in some cases but I tested again today and that does not seem to fix the issue.
from assert_cmd.
Related Issues (20)
- Question regarding "flaky" commands HOT 8
- Cannot find binary during cargo test in CI HOT 2
- Add track_callers to asserts
- stdout/stderr for text processes is ugly HOT 4
- Unable to test TTY behavior HOT 5
- Document how to use assert_cmd with rust-cross HOT 5
- How to handle permissions? HOT 8
- Improve the Debug implementation of Command HOT 1
- Assert#dump() HOT 2
- Some help with getting started HOT 4
- Running a binary in cargo workspace HOT 3
- .timeout() functionality does not work on payload processes with children HOT 3
- Dependency Dashboard
- Track performance metrics of child processes HOT 2
- how to trigger binary builds from 'cargo test' HOT 2
- Allow customising number of lines shown before <n lines omitted> HOT 5
- unknown feature `proc_macro_span_shrink` with Rust 1.74.0 HOT 3
- Documentation for subcommand HOT 1
- Reexport `predicates` in crate root HOT 1
- Add .try_assert() for a panic-free version of .assert() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from assert_cmd.