]> git.proxmox.com Git - cargo.git/commitdiff
Fix message order
authorDale Wijnand <dale.wijnand@gmail.com>
Fri, 30 Nov 2018 23:16:34 +0000 (23:16 +0000)
committerDale Wijnand <dale.wijnand@gmail.com>
Fri, 30 Nov 2018 23:16:34 +0000 (23:16 +0000)
tests/testsuite/test.rs

index 9bc4993da0580e305fbaddc015fc5ffdc37ee2b9..c64dd127d65c74049992b0e977590c526ce94f18 100644 (file)
@@ -3080,10 +3080,11 @@ fn json_artifact_includes_executable_for_integration_tests() {
         .file("tests/integration_test.rs", r#"#[test] fn integration_test() {}"#)
         .build();
 
-    p.cargo("test -v --no-run --message-format=json --test integration_test")
+    // Using jobs=1 to ensure that the order of messages is consistent.
+    p.cargo("test -v --no-run --message-format=json --jobs=1 --test integration_test")
         .with_json(r#"
             {
-                "executable": "[..]/foo/target/debug/foo[EXE]",
+                "executable": "[..]/foo/target/debug/integration_test-[..][EXE]",
                 "features": [],
                 "filenames": "{...}",
                 "fresh": false,
@@ -3092,15 +3093,15 @@ fn json_artifact_includes_executable_for_integration_tests() {
                 "reason": "compiler-artifact",
                 "target": {
                     "crate_types": [ "bin" ],
-                    "kind": [ "bin" ],
+                    "kind": [ "test" ],
                     "edition": "2015",
-                    "name": "foo",
-                    "src_path": "[..]/foo/src/main.rs"
+                    "name": "integration_test",
+                    "src_path": "[..]/foo/tests/integration_test.rs"
                 }
             }
 
             {
-                "executable": "[..]/foo/target/debug/integration_test-[..][EXE]",
+                "executable": "[..]/foo/target/debug/foo[EXE]",
                 "features": [],
                 "filenames": "{...}",
                 "fresh": false,
@@ -3109,10 +3110,10 @@ fn json_artifact_includes_executable_for_integration_tests() {
                 "reason": "compiler-artifact",
                 "target": {
                     "crate_types": [ "bin" ],
-                    "kind": [ "test" ],
+                    "kind": [ "bin" ],
                     "edition": "2015",
-                    "name": "integration_test",
-                    "src_path": "[..]/foo/tests/integration_test.rs"
+                    "name": "foo",
+                    "src_path": "[..]/foo/src/main.rs"
                 }
             }
         "#)