[TCT][Device][Non-ACR] Skip power lock/unlock test on headless 08/267608/1
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 8 Dec 2021 01:18:19 +0000 (10:18 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 8 Dec 2021 01:18:19 +0000 (10:18 +0900)
Change-Id: I3323fe0a9f477d72c3991a925d98f46f4142b450
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/itc/device/ITs-device_power.c

index 650c87c4cd873b36fedaca513465eddd9c1de2de..7a91b17fbfaeff890fb3948f73598e2edfb18e03 100644 (file)
@@ -95,15 +95,14 @@ int ITc_device_power_request_release_lock_p(void)
        int enum_size = sizeof(power_locks) / sizeof(power_locks[0]);
        int enum_counter = 0;
 
+       if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
+               return 0;
+
        for ( enum_counter=0; enum_counter<enum_size; enum_counter++)
        {
                // Target API
                int nRet = device_power_request_lock(power_locks[enum_counter], 10);
-               if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
-               {
-                       assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
-               }
-               else if ( nRet != DEVICE_ERROR_NONE )
+               if ( nRet != DEVICE_ERROR_NONE )
                {
                        FPRINTF("[Line : %d][%s] device_power_request_lock failed for enum = %s, error returned = %s\\n",
                                __LINE__, API_NAMESPACE, DeviceGetPowerLock(power_locks[enum_counter]), DeviceGetError(nRet));
@@ -112,11 +111,7 @@ int ITc_device_power_request_release_lock_p(void)
 
                // Target API
                nRet  = device_power_release_lock(power_locks[enum_counter]);
-               if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false))
-               {
-                       assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED);
-               }
-               else if ( nRet != DEVICE_ERROR_NONE )
+               if ( nRet != DEVICE_ERROR_NONE )
                {
                        FPRINTF("[Line : %d][%s] device_power_release_lock failed for enum = %s, error returned = %s\\n",
                                __LINE__, API_NAMESPACE, DeviceGetPowerLock(power_locks[enum_counter]), DeviceGetError(nRet));