Skip to content

Commit 92255ac

Browse files
committed
test: Migrate to pretty jsonlines for bench tests
1 parent 352d023 commit 92255ac

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

tests/testsuite/bench.rs

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,11 +2112,39 @@ fn json_artifact_includes_executable_for_benchmark() {
21122112
p.cargo("bench --no-run --message-format=json")
21132113
.with_stdout_data(
21142114
str![[r#"
2115-
{"executable":"[ROOT]/foo/target/release/deps/benchmark-[HASH][EXE]","features":[],"filenames":"{...}","fresh":false,"manifest_path":"[ROOT]/foo/Cargo.toml","package_id":"path+[ROOTURL]/foo#0.0.1","profile":"{...}","reason":"compiler-artifact","target":{"crate_types":["bin"],"doc":false,"doctest":false,"edition":"2015","kind":["bench"],"name":"benchmark","src_path":"[ROOT]/foo/benches/benchmark.rs","test":false}}
2116-
{"reason":"build-finished","success":true}
2117-
2115+
[
2116+
{
2117+
"executable": "[..]",
2118+
"features": [],
2119+
"filenames": "{...}",
2120+
"fresh": false,
2121+
"manifest_path": "[ROOT]/foo/Cargo.toml",
2122+
"package_id": "path+[ROOTURL]/foo#0.0.1",
2123+
"profile": "{...}",
2124+
"reason": "compiler-artifact",
2125+
"target": {
2126+
"crate_types": [
2127+
"bin"
2128+
],
2129+
"doc": false,
2130+
"doctest": false,
2131+
"edition": "2015",
2132+
"kind": [
2133+
"bench"
2134+
],
2135+
"name": "benchmark",
2136+
"src_path": "[ROOT]/foo/benches/benchmark.rs",
2137+
"test": false
2138+
}
2139+
},
2140+
{
2141+
"reason": "build-finished",
2142+
"success": true
2143+
}
2144+
]
21182145
"#]]
2119-
.is_jsonlines(),
2146+
.is_json()
2147+
.against_jsonlines(),
21202148
)
21212149
.run();
21222150
}

0 commit comments

Comments
 (0)