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

Commit 96a098a8 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

graphics: more reusable libVtsHalGraphicsComposerTestUtils

Versioned library names, versioned include paths, and others.

Test: make VtsHalGraphicsComposerV2_1TargetTest
Change-Id: Ic266763c9ef25e09bc2c97026f2e1324609f48c6
parent 8b20c5c8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -2,6 +2,15 @@ cc_library_headers {
    name: "android.hardware.graphics.composer@2.1-command-buffer",
    defaults: ["hidl_defaults"],
    vendor_available: true,
    shared_libs: ["android.hardware.graphics.composer@2.1"],
    shared_libs: [
        "android.hardware.graphics.composer@2.1",
        "libfmq",
        "libsync",
    ],
    export_shared_lib_headers: [
        "android.hardware.graphics.composer@2.1",
        "libfmq",
        "libsync",
    ],
    export_include_dirs: ["include"],
}
+5 −12
Original line number Diff line number Diff line
@@ -15,31 +15,24 @@
//

cc_library_static {
    name: "libVtsHalGraphicsComposerTestUtils",
    name: "android.hardware.graphics.composer@2.1-vts",
    defaults: ["hidl_defaults"],
    srcs: [
        "ComposerVts.cpp",
        "GraphicsComposerCallback.cpp",
        "TestCommandReader.cpp",
        "VtsHalGraphicsComposerTestUtils.cpp",
    ],
    shared_libs: [
        "android.hardware.graphics.composer@2.1",
        "libfmq",
        "libsync",
    ],
    static_libs: [
        "VtsHalHidlTargetTestBase",
        "android.hardware.graphics.composer@2.1",
    ],
    header_libs: [
        "android.hardware.graphics.composer@2.1-command-buffer",
    ],
    cflags: [
        "-Wall",
        "-Wextra",
        "-Werror",
        "-O0",
        "-g",
        "-DLOG_TAG=\"GraphicsComposerTestUtils\"",
        "-DLOG_TAG=\"ComposerVts\"",
    ],
    export_include_dirs: ["include/composer-vts/2.1"],
    export_include_dirs: ["include"],
}
+4 −4
Original line number Diff line number Diff line
@@ -14,16 +14,16 @@
 * limitations under the License.
 */

#include <VtsHalHidlTargetTestBase.h>
#include <composer-vts/2.1/ComposerVts.h>

#include "VtsHalGraphicsComposerTestUtils.h"
#include <VtsHalHidlTargetTestBase.h>

namespace android {
namespace hardware {
namespace graphics {
namespace composer {
namespace V2_1 {
namespace tests {
namespace vts {

Composer::Composer() {
    mComposer = ::testing::VtsHalHidlTargetTestBase::getService<IComposer>();
@@ -316,7 +316,7 @@ void ComposerClient::execute(TestCommandReader* reader, CommandWriterBase* write
                             });
}

}  // namespace tests
}  // namespace vts
}  // namespace V2_1
}  // namespace composer
}  // namespace graphics
+3 −3
Original line number Diff line number Diff line
@@ -14,14 +14,14 @@
 * limitations under the License.
 */

#include "GraphicsComposerCallback.h"
#include <composer-vts/2.1/GraphicsComposerCallback.h>

namespace android {
namespace hardware {
namespace graphics {
namespace composer {
namespace V2_1 {
namespace tests {
namespace vts {

void GraphicsComposerCallback::setVsyncAllowed(bool allowed) {
    std::lock_guard<std::mutex> lock(mMutex);
@@ -84,7 +84,7 @@ Return<void> GraphicsComposerCallback::onVsync(Display display, int64_t) {
    return Void();
}

}  // namespace tests
}  // namespace vts
}  // namespace V2_1
}  // namespace composer
}  // namespace graphics
+3 −3
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
 * limitations under the License.
 */

#include "TestCommandReader.h"
#include <composer-vts/2.1/TestCommandReader.h>

#include <gtest/gtest.h>

@@ -23,7 +23,7 @@ namespace hardware {
namespace graphics {
namespace composer {
namespace V2_1 {
namespace tests {
namespace vts {

void TestCommandReader::parse() {
    while (!isEmpty()) {
@@ -54,7 +54,7 @@ void TestCommandReader::parse() {
    }
}

}  // namespace tests
}  // namespace vts
}  // namespace V2_1
}  // namespace composer
}  // namespace graphics
Loading