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

Commit c9e76799 authored by Calin Juravle's avatar Calin Juravle
Browse files

Extract the otapreopt parameters in their own class and add tests

This is in preparation to get rid of the annoying
ReadArgumentV1..5 pattern and to be able to write
unit tests.

Test: installd_dexopt_test
Bug: 72666394
Change-Id: I0ad438ee69aa82d9ff2ad2f94d465dcc78ea8c28
parent 2372d125
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -92,4 +92,28 @@ filegroup {
    ],
}

//
// Static library for otapreopt used in testing
//
cc_library_static {
    name: "libotapreoptparameters",
    cflags: [
        "-Wall",
        "-Werror"
    ],
    clang: true,

    srcs: [
        "otapreopt_parameters.cpp"],

    export_include_dirs: ["."],

    shared_libs: [
        "libbase",
        "libcutils",
        "liblog",
        "libutils",
    ],
}

subdirs = ["tests"]
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ LOCAL_CFLAGS += -DART_BASE_ADDRESS=$(LIBART_IMG_HOST_BASE_ADDRESS)
LOCAL_CFLAGS += -DART_BASE_ADDRESS_MIN_DELTA=$(LOCAL_LIBART_IMG_HOST_MIN_BASE_ADDRESS_DELTA)
LOCAL_CFLAGS += -DART_BASE_ADDRESS_MAX_DELTA=$(LOCAL_LIBART_IMG_HOST_MAX_BASE_ADDRESS_DELTA)

LOCAL_SRC_FILES := otapreopt.cpp globals.cpp utils.cpp dexopt.cpp
LOCAL_SRC_FILES := otapreopt.cpp otapreopt_parameters.cpp globals.cpp utils.cpp dexopt.cpp
LOCAL_HEADER_LIBRARIES := dex2oat_headers
LOCAL_SHARED_LIBRARIES := \
    libbase \
+26 −582

File changed.

Preview size limit exceeded, changes collapsed.

+601 −0

File added.

Preview size limit exceeded, changes collapsed.

+61 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading