haltest: skip test if playback/capture device is unavailable 17/256417/4 accepted/tizen/unified/20210412.090904 submit/tizen/20210405.034048
authorSeungbae Shin <seungbae.shin@samsung.com>
Fri, 2 Apr 2021 06:47:54 +0000 (15:47 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 2 Apr 2021 10:11:20 +0000 (10:11 +0000)
[Version] 0.0.7
[Issue Type] Update

Change-Id: I41c91f7957dbd4ba80f4a49be1a02215cdd03ac1

packaging/hal-api-audio.spec
testcase/audio_haltests.cpp

index dae195147b6cc77573093a2c9624715b753e90b1..c34bcf4b5f2d177565e40436a6d7f43cba5cc2c3 100644 (file)
@@ -1,6 +1,6 @@
 Name:       hal-api-audio
 Summary:    TIZEN Audio HAL
-Version:    0.0.6
+Version:    0.0.7
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 26bb88f45cfb4b75c781055abd6c1470203002cd..a4085877dbd190359a42fd11cec6a62312af4fde 100644 (file)
@@ -951,6 +951,11 @@ TEST_F(AudioHalTest, PcmOpenWriteCloseP)
 
        CDeviceMapParser().get_playback(card, dev, rate, channels);
 
+       if (card.empty() || dev.empty()) {
+               cerr << "skip due to no playback device [card: " << card << " / device: " << dev << "]" << endl;
+               return; // FIXME : update with GTEST_SKIP() once supported
+       }
+
        m_spec = {
                AUDIO_SAMPLE_S16LE, static_cast<uint32_t>(rate), static_cast<uint8_t>(channels)
        };
@@ -996,6 +1001,11 @@ TEST_F(AudioHalTest, PcmOpenReadCloseP)
 
        CDeviceMapParser().get_capture(card, dev, rate, channels);
 
+       if (card.empty() || dev.empty()) {
+               cerr << "skip due to no capture device [card: " << card << " / device: " << dev << "]" << endl;
+               return; // FIXME : replace with GTEST_SKIP() once supported
+       }
+
        m_spec = {
                AUDIO_SAMPLE_S16LE, static_cast<uint32_t>(rate), static_cast<uint8_t>(channels)
        };