mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Audio VTS: run tear-down hooks in LIFO instead of FIFO
The audio tests use a static cache of some HAL objects for
performance reasons (speed up by 10x on Pixel).
Those object are destroy during the test environment tear-down.
This tear-down was destroying the objects in a FIFO instead of LIFO
order. Thus the DeficesFactory was destroyed before the Device it
created.
Bug: 79889318
Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target
check that the device destructor is called before the
devicesFactory one.
Change-Id: I1b4345158139ba14a8779a9508f7ebdc41129d1d
Signed-off-by: Kevin Rocard <krocard@google.com>
This commit is contained in:
@@ -36,7 +36,7 @@ namespace utility {
|
|||||||
class Environment : public ::testing::Environment {
|
class Environment : public ::testing::Environment {
|
||||||
public:
|
public:
|
||||||
using TearDownFunc = std::function<void()>;
|
using TearDownFunc = std::function<void()>;
|
||||||
void registerTearDown(TearDownFunc&& tearDown) { tearDowns.push_back(std::move(tearDown)); }
|
void registerTearDown(TearDownFunc&& tearDown) { tearDowns.push_front(std::move(tearDown)); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void TearDown() override {
|
void TearDown() override {
|
||||||
|
|||||||
Reference in New Issue
Block a user