add xml report
- add getDeviceInfo command to get information from client
- rename ModelBuilderTest test case xml (all.xml gone)
- reduce buffer size for AudioTrack if data size is small
- add -s option
- generate XML report similar to CtsVerifier and zip the result.
Change-Id: Ic28e0234cfdb848ba1a2f91cc57f15bfdefafd87
diff --git a/suite/audio_quality/test/RemoteAudioFakeTcpTest.cpp b/suite/audio_quality/test/RemoteAudioFakeTcpTest.cpp
index 7d77a9b..d428c17 100644
--- a/suite/audio_quality/test/RemoteAudioFakeTcpTest.cpp
+++ b/suite/audio_quality/test/RemoteAudioFakeTcpTest.cpp
@@ -307,3 +307,24 @@
mTestSocket.setReadExpectation((char*)stopReply, sizeof(stopReply));
mRemoteAudio->stopRecording();
}
+
+TEST_F(RemoteAudioFakeTcpTest, getDeviceInfoTest) {
+ uint32_t prepareSend[] = {
+ U32_ENDIAN_SWAP(AudioProtocol::ECmdGetDeviceInfo),
+ U32_ENDIAN_SWAP(0)
+ };
+ uint32_t prepareReply[] = {
+ U32_ENDIAN_SWAP((AudioProtocol::ECmdGetDeviceInfo & 0xffff) | 0x43210000),
+ 0,
+ U32_ENDIAN_SWAP(4),
+ U32_ENDIAN_SWAP(0x30313233)
+ };
+
+ mTestSocket.setSendExpectation((char*)prepareSend, sizeof(prepareSend));
+ // this is reply, but set expectation for reply first as it is sent after send
+ mTestSocket.setReadExpectation((char*)prepareReply, sizeof(prepareReply));
+
+ android::String8 info;
+ ASSERT_TRUE(mRemoteAudio->getDeviceInfo(info));
+ ASSERT_TRUE(info == "0123");
+}