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

Commit 96f46c4a authored by Kevin Rocard's avatar Kevin Rocard
Browse files

Audio HAL VTS: Log test unexpected behaviour



Some test output infos that are useful to understand how they run.
Unfortunately the xml report does not seem to be saved by VTS tradefed.
Thus output them in logcat.

Test: vts-tradefed run vts --module VtsHalAudioV2_0Target
Test: call/play music/record/video...
Bug: 36311550
Change-Id: I9a2cc10160c3b1c8f81db0464efbc6b26600cadc
Signed-off-by: default avatarKevin Rocard <krocard@google.com>
parent f26f67a1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -83,6 +83,10 @@ using ::android::hardware::audio::common::V2_0::ThreadInfo;

using utility::returnIn;

const char* getTestName() {
    return ::testing::UnitTest::GetInstance()->current_test_info()->name();
}

namespace doc {
/** Document the current test case.
 * Eg: calling `doc::test("Dump the state of the hal")` in the "debugDump" test
@@ -100,11 +104,13 @@ void test(const std::string& testCaseDocumentation) {
/** Document why a test was not fully run. Usually due to an optional feature
 * not implemented. */
void partialTest(const std::string& reason) {
    LOG(INFO) << "Test " << getTestName() << " partially run: " << reason;
    ::testing::Test::RecordProperty("partialyRunTest", reason);
}

/** Add a note to the test. */
void note(const std::string& note) {
    LOG(INFO) << "Test " << getTestName() << " noted: " << note;
    ::testing::Test::RecordProperty("note", note);
}
}