diff options
Diffstat (limited to 'pkgs/build-support/rust/build-rust-crate/test/default.nix')
-rw-r--r-- | pkgs/build-support/rust/build-rust-crate/test/default.nix | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/build-support/rust/build-rust-crate/test/default.nix b/pkgs/build-support/rust/build-rust-crate/test/default.nix index f0f1ed4d1ebf6..aa20bd03b189b 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/default.nix @@ -92,7 +92,17 @@ let cases = { libPath = { libPath = "src/my_lib.rs"; src = mkLib "src/my_lib.rs"; }; srcLib = { src = mkLib "src/lib.rs"; }; - customLibName = { libName = "test_lib"; src = mkLib "src/test_lib.rs"; }; + + # This used to be supported by cargo but as of 1.40.0 I can't make it work like that with just cargo anymore. + # This might be a regression or deprecated thing they finally removed… + # customLibName = { libName = "test_lib"; src = mkLib "src/test_lib.rs"; }; + # rustLibTestsCustomLibName = { + # libName = "test_lib"; + # src = mkTestFile "src/test_lib.rs" "foo"; + # buildTests = true; + # expectedTestOutputs = [ "test foo ... ok" ]; + # }; + customLibNameAndLibPath = { libName = "test_lib"; libPath = "src/best-lib.rs"; src = mkLib "src/best-lib.rs"; }; crateBinWithPath = { crateBin = [{ name = "test_binary1"; path = "src/foobar.rs"; }]; src = mkBin "src/foobar.rs"; }; crateBinNoPath1 = { crateBin = [{ name = "my-binary2"; }]; src = mkBin "src/my_binary2.rs"; }; @@ -122,12 +132,6 @@ let buildTests = true; expectedTestOutputs = [ "test baz ... ok" ]; }; - rustLibTestsCustomLibName = { - libName = "test_lib"; - src = mkTestFile "src/test_lib.rs" "foo"; - buildTests = true; - expectedTestOutputs = [ "test foo ... ok" ]; - }; rustLibTestsCustomLibPath = { libPath = "src/test_path.rs"; src = mkTestFile "src/test_path.rs" "bar"; |