From: Youngjae Cho Date: Mon, 6 Dec 2021 05:58:20 +0000 (+0900) Subject: [TCT][Device][Non-ACR] Add not supported check for power API on headless X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4351b69e9b31eb276cd9e11de36369472eb69391;p=test%2Ftct%2Fnative%2Fapi.git [TCT][Device][Non-ACR] Add not supported check for power API on headless Change-Id: I931ef5b006c4c9c4daa28b4d81020709a92404f8 Signed-off-by: Youngjae Cho --- diff --git a/src/itc/device/ITs-device_power.c b/src/itc/device/ITs-device_power.c index bbbd8af8d..650c87c4c 100644 --- a/src/itc/device/ITs-device_power.c +++ b/src/itc/device/ITs-device_power.c @@ -99,23 +99,11 @@ int ITc_device_power_request_release_lock_p(void) { // Target API int nRet = device_power_request_lock(power_locks[enum_counter], 10); - if ((bIsDisplayFeatureSupported == false) || - (bIsDisplayStateFeatureSupported == false)) + if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false)) { - if ((power_locks[enum_counter] == POWER_LOCK_DISPLAY) || - (power_locks[enum_counter] == POWER_LOCK_DISPLAY_DIM)) - { - assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED); - return 0; - } - else if (power_locks[enum_counter] == POWER_LOCK_CPU) - { - assert_eq(nRet, DEVICE_ERROR_NONE); - return 0; - } + assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED); } - - if ( nRet != DEVICE_ERROR_NONE ) + else 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)); @@ -124,23 +112,11 @@ 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)) + if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false)) { - if ((power_locks[enum_counter] == POWER_LOCK_DISPLAY) || - (power_locks[enum_counter] == POWER_LOCK_DISPLAY_DIM)) - { - assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED); - return 0; - } - else if (power_locks[enum_counter] == POWER_LOCK_CPU) - { - assert_eq(nRet, DEVICE_ERROR_NONE); - return 0; - } + assert_eq(nRet, DEVICE_ERROR_NOT_SUPPORTED); } - - if ( nRet != DEVICE_ERROR_NONE ) + else 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));