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

Commit 1efc37c9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "gui: Set up libgui_mocks"

parents b1e0323f 1ebe090c
Loading
Loading
Loading
Loading
+49 −23
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ cc_library_shared {
    defaults: ["libgui_bufferqueue-defaults"],

    srcs: [
        ":libgui_bufferqueue_sources",

        "BitTube.cpp",
        "BufferHubConsumer.cpp",
        "BufferHubProducer.cpp",
@@ -104,32 +106,14 @@ cc_library_static {
    ],

    defaults: ["libgui_bufferqueue-defaults"],
}

// Common build config shared by libgui and libgui_bufferqueue_static.
cc_defaults {
    name: "libgui_bufferqueue-defaults",

    clang: true,
    cflags: [
        "-Wall",
        "-Werror",
    ],

    cppflags: [
        "-Wextra",
        "-DDEBUG_ONLY_CODE=0",
    ],

    product_variables: {
        eng: {
            cppflags: [
                "-UDEBUG_ONLY_CODE",
                "-DDEBUG_ONLY_CODE=1",
    srcs: [
        ":libgui_bufferqueue_sources",
    ],
        },
    },
}

filegroup {
    name: "libgui_bufferqueue_sources",
    srcs: [
        "BufferItem.cpp",
        "BufferQueue.cpp",
@@ -157,6 +141,31 @@ cc_defaults {
        "bufferqueue/2.0/H2BProducerListener.cpp",
        "bufferqueue/2.0/types.cpp",
    ],
}

// Common build config shared by libgui and libgui_bufferqueue_static.
cc_defaults {
    name: "libgui_bufferqueue-defaults",

    clang: true,
    cflags: [
        "-Wall",
        "-Werror",
    ],

    cppflags: [
        "-Wextra",
        "-DDEBUG_ONLY_CODE=0",
    ],

    product_variables: {
        eng: {
            cppflags: [
                "-UDEBUG_ONLY_CODE",
                "-DDEBUG_ONLY_CODE=1",
            ],
        },
    },

    shared_libs: [
        "android.hardware.graphics.bufferqueue@1.0",
@@ -204,4 +213,21 @@ cc_defaults {
    ],
}

// GMocks for use by external code
cc_library_static {
    name: "libgui_mocks",
    vendor_available: false,

    defaults: ["libgui_bufferqueue-defaults"],
    static_libs: [
        "libgtest",
        "libgmock",
    ],

    srcs: [
        "mock/GraphicBufferConsumer.cpp",
        "mock/GraphicBufferProducer.cpp",
    ],
}

subdirs = ["tests"]
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

#include "mock/gui/MockGraphicBufferConsumer.h"
#include <gui/mock/GraphicBufferConsumer.h>

namespace android {
namespace mock {
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

#include "mock/gui/MockGraphicBufferProducer.h"
#include <gui/mock/GraphicBufferProducer.h>

namespace android {
namespace mock {
Loading