Merge pull request #2646 from cgwalters/bindings-tests

rust-bindings: Wire up `tests/`
This commit is contained in:
Luca Bruno 2022-06-13 07:46:14 +00:00 committed by GitHub
commit 68d1f54c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -29,6 +29,10 @@ features = ["dox"]
name = "ostree"
path = "rust-bindings/src/lib.rs"
[[test]]
name = "integration"
path = "rust-bindings/tests/tests.rs"
[workspace]
members = [".", "rust-bindings/sys"]

View File

@ -53,10 +53,7 @@ pub fn create_mtree(repo: &ostree::Repo) -> ostree::MutableTree {
assert_eq!(mtree.copy_files().len(), 0);
assert_eq!(mtree.copy_subdirs().len(), 0);
let file = gio::File::for_path(
Path::new(env!("CARGO_MANIFEST_DIR"))
.join("tests")
.join("data")
.join("test.tar"),
Path::new(env!("CARGO_MANIFEST_DIR")).join("rust-bindings/tests/data/test.tar"),
);
repo.write_archive_to_mtree(&file, &mtree, None, true, NONE_CANCELLABLE)
.expect("test mtree");