libsnapshot: Add vts_userspace_snapshot_test

Toggle virtual_ab.userspace.snapshots.enabled to test
both:

1: vts_libsnapshot_test - testing kernel dm-snapshot
2: vts_userspace_snapshot_test - testing user-space snapshot

Bug: 193863443
Test: vts_userspace_snapshot_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I873e7476d71feb9a2e12054e968443bd22ee817c
This commit is contained in:
Akilesh Kailash 2021-11-18 23:00:29 +00:00
parent 3b874456fc
commit 6e35cb89ff
2 changed files with 2570 additions and 0 deletions

View file

@ -258,11 +258,62 @@ cc_defaults {
require_root: true,
}
cc_defaults {
name: "userspace_snapshot_test_defaults",
defaults: ["libsnapshot_defaults"],
srcs: [
"partition_cow_creator_test.cpp",
"snapshot_metadata_updater_test.cpp",
"snapshot_reader_test.cpp",
"userspace_snapshot_test.cpp",
"snapshot_writer_test.cpp",
],
shared_libs: [
"libbinder",
"libcrypto",
"libhidlbase",
"libprotobuf-cpp-lite",
"libutils",
"libz",
],
static_libs: [
"android.hardware.boot@1.0",
"android.hardware.boot@1.1",
"libbrotli",
"libc++fs",
"libfs_mgr_binder",
"libgsi",
"libgmock",
"liblp",
"libsnapshot",
"libsnapshot_cow",
"libsnapshot_test_helpers",
"libsparse",
],
header_libs: [
"libstorage_literals_headers",
],
test_suites: [
"vts",
"device-tests"
],
test_options: {
min_shipping_api_level: 29,
},
auto_gen_config: true,
require_root: true,
}
cc_test {
name: "vts_libsnapshot_test",
defaults: ["libsnapshot_test_defaults"],
}
cc_test {
name: "vts_userspace_snapshot_test",
defaults: ["userspace_snapshot_test_defaults"],
}
cc_binary {
name: "snapshotctl",
srcs: [

File diff suppressed because it is too large Load diff