Merge "Support waiting for surfaceflinger service to stop before test starts" am: 1d8b9fc0b7 am: e814075692 am: 41d7e091e9

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1486339

Change-Id: I967f4c441ba2bce676c6a5716117a4b58bc2c80e
This commit is contained in:
Treehugger Robot
2020-12-02 09:57:54 +00:00
committed by Automerger Merge Worker
8 changed files with 56 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ cc_test {
// TODO(b/64437680): Assume these libs are always available on the device.
shared_libs: [
"libbase",
"libfmq",
"libsync",
"android.hardware.graphics.mapper@2.0",

View File

@@ -17,6 +17,7 @@
#define LOG_TAG "graphics_composer_hidl_hal_test"
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <composer-vts/2.1/ComposerVts.h>
#include <composer-vts/2.1/GraphicsComposerCallback.h>
#include <composer-vts/2.1/TestCommandReader.h>
@@ -1102,3 +1103,15 @@ INSTANTIATE_TEST_SUITE_P(
} // namespace graphics
} // namespace hardware
} // namespace android
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
using namespace std::chrono_literals;
if (!android::base::WaitForProperty("init.svc.surfaceflinger", "stopped", 10s)) {
ALOGE("Failed to stop init.svc.surfaceflinger");
return -1;
}
return RUN_ALL_TESTS();
}

View File

@@ -31,6 +31,7 @@ cc_test {
"libEGL",
"libGLESv1_CM",
"libGLESv2",
"libbase",
"libfmq",
"libgui",
"libhidlbase",

View File

@@ -17,6 +17,7 @@
#define LOG_TAG "graphics_composer_hidl_hal_test@2.2"
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <composer-vts/2.1/GraphicsComposerCallback.h>
#include <composer-vts/2.1/TestCommandReader.h>
@@ -700,3 +701,15 @@ INSTANTIATE_TEST_SUITE_P(
} // namespace graphics
} // namespace hardware
} // namespace android
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
using namespace std::chrono_literals;
if (!android::base::WaitForProperty("init.svc.surfaceflinger", "stopped", 10s)) {
ALOGE("Failed to stop init.svc.surfaceflinger");
return -1;
}
return RUN_ALL_TESTS();
}

View File

@@ -21,6 +21,7 @@ cc_test {
// TODO(b/64437680): Assume these libs are always available on the device.
shared_libs: [
"libbase",
"libfmq",
"libhidlbase",
"libsync",

View File

@@ -19,6 +19,7 @@
#include <algorithm>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <composer-command-buffer/2.3/ComposerCommandBuffer.h>
#include <composer-vts/2.1/GraphicsComposerCallback.h>
@@ -630,3 +631,15 @@ INSTANTIATE_TEST_SUITE_P(
} // namespace graphics
} // namespace hardware
} // namespace android
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
using namespace std::chrono_literals;
if (!android::base::WaitForProperty("init.svc.surfaceflinger", "stopped", 10s)) {
ALOGE("Failed to stop init.svc.surfaceflinger");
return -1;
}
return RUN_ALL_TESTS();
}

View File

@@ -21,6 +21,7 @@ cc_test {
// TODO(b/64437680): Assume these libs are always available on the device.
shared_libs: [
"libbase",
"libfmq",
"libsync",
"android.hardware.graphics.mapper@2.0",

View File

@@ -21,6 +21,7 @@
#include <thread>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android/hardware/graphics/mapper/2.0/IMapper.h>
#include <composer-command-buffer/2.4/ComposerCommandBuffer.h>
#include <composer-vts/2.4/ComposerVts.h>
@@ -685,3 +686,15 @@ TEST_P(GraphicsComposerHidlCommandTest, getLayerGenericMetadataKeys) {
} // namespace graphics
} // namespace hardware
} // namespace android
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
using namespace std::chrono_literals;
if (!android::base::WaitForProperty("init.svc.surfaceflinger", "stopped", 10s)) {
ALOGE("Failed to stop init.svc.surfaceflinger");
return -1;
}
return RUN_ALL_TESTS();
}