Skip to content

Commit

Permalink
Auto merge of #9577 - ehuss:json-test, r=alexcrichton
Browse files Browse the repository at this point in the history
Fix package_default_run test.

The `package_default_run` test was checking the output of `cargo metadata`, which included the "targets" field. Unfortunately the order of the targets in this test depend on the filesystem order, so the test may randomly fail.

The fix here is to just check for the one field that this test was interested in.

An alternate solution would be to sort the targets.  Another alternate solution would be to use `"{...}"` for the targets to ignore them.  I kinda liked simplifying it to check just one field.

This includes a series of commits that are just general changes to the test infrastructure:

* Change cargo-test-support to use anyhow.
* Remove unused `ErrMsg`.
* Fix a bug with `verify_checks_output`.
* Remove the weird Debug impl for Execs.
* Added a helper function for getting the JSON output from cargo.  (I can imagine a lot of possible enhancements here.)
  • Loading branch information
bors committed Jun 12, 2021
2 parents 81537ee + 2492bf5 commit 4445667
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 194 deletions.
Loading

0 comments on commit 4445667

Please sign in to comment.