Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e35cb89 authored by Akilesh Kailash's avatar Akilesh Kailash
Browse files

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: default avatarAkilesh Kailash <akailash@google.com>
Change-Id: I873e7476d71feb9a2e12054e968443bd22ee817c
parent 3b874456
Loading
Loading
Loading
Loading
+51 −0
Original line number Diff line number Diff line
@@ -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: [
+2519 −0

File added.

Preview size limit exceeded, changes collapsed.