-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
931 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Error: tests failed | ||
|
||
Location: | ||
$DIR/src/lib.rs:LL:CC | ||
error: test failed, to rerun pass `--test ui` | ||
|
||
Caused by: | ||
process didn't exit successfully: `$DIR/target/ui/tests/integrations/dep-fail/debug/deps/ui-HASH` (exit status: 1) | ||
error: 1 target failed: | ||
`--test ui` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
running 0 tests | ||
|
||
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished | ||
|
||
Building dependencies ... FAILED | ||
tests/ui/basic_test.rs ... FAILED | ||
|
||
FAILED TEST: tests/ui/basic_test.rs | ||
command: "\"Building dependencies\"" | ||
|
||
full stderr: | ||
failed to compile dependencies: | ||
command: "$CMD" "build" "--target-dir" "$DIR/tests/integrations/dep-fail/target/ui" "--manifest-path" "tested_crate/Cargo.toml" "--target=x86_64-unknown-linux-gnu" "--message-format=json" | ||
stderr: | ||
Blocking waiting for file lock on package cache | ||
Compiling tested_crate v0.1.0-dev ($DIR/tests/integrations/dep-fail/tested_crate) | ||
error: could not compile `tested_crate` (lib) due to 2 previous errors | ||
|
||
|
||
stdout:{"reason":"compiler-message","package_id":"path+file://$DIR/tests/integrations/dep-fail/tested_crate#0.1.0-dev","manifest_path":"$DIR/tests/integrations/dep-fail/tested_crate/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"tested_crate","src_path":"$DIR/tests/integrations/dep-fail/tested_crate/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"message":{"rendered":"error: this file contains an unclosed delimiter\n --> src/lib.rs:LL:CC\n |\n1 | pub trait A {\n | - ^\n | |\n | unclosed delimiter\n\n","$message_type":"diagnostic","children":[],"code":null,"level":"error","message":"this file contains an unclosed delimiter","spans":[{"byte_end":13,"byte_start":12,"column_end":14,"column_start":13,"expansion":null,"file_name":"src/lib.rs","is_primary":false,"label":"unclosed delimiter","line_end":1,"line_start":1,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":14,"highlight_start":13,"text":"pub trait A {"}]},{"byte_end":14,"byte_start":14,"column_end":15,"column_start":15,"expansion":null,"file_name":"src/lib.rs","is_primary":true,"label":null,"line_end":1,"line_start":1,"suggested_replacement":null,"suggestion_applicability":null,"text":[{"highlight_end":15,"highlight_start":15,"text":"pub trait A {"}]}]}} | ||
{"reason":"compiler-message","package_id":"path+file://$DIR/tests/integrations/dep-fail/tested_crate#0.1.0-dev","manifest_path":"$DIR/tests/integrations/dep-fail/tested_crate/Cargo.toml","target":{"kind":["lib"],"crate_types":["lib"],"name":"tested_crate","src_path":"$DIR/tests/integrations/dep-fail/tested_crate/src/lib.rs","edition":"2021","doc":true,"doctest":true,"test":true},"message":{"rendered":"error: aborting due to 1 previous error\n\n","$message_type":"diagnostic","children":[],"code":null,"level":"error","message":"aborting due to 1 previous error","spans":[]}} | ||
{"reason":"build-finished","success":false} | ||
|
||
|
||
Location: | ||
$DIR/src/dependencies.rs:LL:CC | ||
full stdout: | ||
|
||
|
||
FAILURES: | ||
tests/ui/basic_test.rs | ||
|
||
test result: FAIL. 1 failed; | ||
|
||
|
||
running 0 tests | ||
|
||
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "compile_test" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dev-dependencies] | ||
ui_test = { path = "../../.." } | ||
|
||
[[test]] | ||
name = "ui" | ||
harness = false |
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "tested_crate" | ||
version = "0.1.0-dev" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub trait A { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
use ui_test::{ | ||
default_file_filter, default_per_file_config, dependencies::DependencyBuilder, | ||
run_tests_generic, status_emitter::Text, Args, Config, OutputConflictHandling, | ||
}; | ||
|
||
fn main() -> ui_test::Result<()> { | ||
let mut config = Config { | ||
output_conflict_handling: OutputConflictHandling::Ignore, | ||
..Config::rustc("tests/ui") | ||
}; | ||
config.comment_defaults.base().set_custom( | ||
"dependencies", | ||
DependencyBuilder { | ||
crate_manifest_path: "tested_crate/Cargo.toml".into(), | ||
..DependencyBuilder::default() | ||
}, | ||
); | ||
|
||
let args = Args::test()?; | ||
|
||
config.with_args(&args); | ||
|
||
run_tests_generic( | ||
[config].into(), | ||
default_file_filter, | ||
default_per_file_config, | ||
Text::verbose(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use tested_crate::A; |