From: Youngjae Cho Date: Mon, 6 Jan 2025 04:47:10 +0000 (+0900) Subject: [ITC/UTC][capi-system-device][Non-ACR] Fix to correctly test headless profile X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0cb33e5cb2aab62795e9a016ec84a560f3f55dd1;p=test%2Ftct%2Fnative%2Fapi.git [ITC/UTC][capi-system-device][Non-ACR] Fix to correctly test headless profile Instead of skipping test on headless profile, do it like headed profile. This is possible due to change of device API and deviced that has become working properly on headless profile. Change-Id: Iee0a301fc43a0656a76cf20ce267d49ed830c92d Signed-off-by: Youngjae Cho --- diff --git a/src/itc/device/ITs-device_power.c b/src/itc/device/ITs-device_power.c index 7a91b17fb..0825b3cf8 100644 --- a/src/itc/device/ITs-device_power.c +++ b/src/itc/device/ITs-device_power.c @@ -91,30 +91,46 @@ int ITc_device_power_request_release_lock_p(void) { START_TEST; - power_lock_e power_locks[] = { POWER_LOCK_CPU, POWER_LOCK_DISPLAY, POWER_LOCK_DISPLAY_DIM }; - int enum_size = sizeof(power_locks) / sizeof(power_locks[0]); + struct expect_return_by_profile { + power_lock_e lock_type; + int headed; + int headless; + } expect_return[] = { + { + .lock_type = POWER_LOCK_CPU, + .headed = DEVICE_ERROR_NONE, + .headless = DEVICE_ERROR_NONE, + }, { + .lock_type = POWER_LOCK_DISPLAY, + .headed = DEVICE_ERROR_NONE, + .headless = DEVICE_ERROR_NOT_SUPPORTED, + }, { + .lock_type = POWER_LOCK_DISPLAY_DIM, + .headed = DEVICE_ERROR_NONE, + .headless = DEVICE_ERROR_NOT_SUPPORTED, + }, + }; + int enum_size = sizeof(expect_return) / sizeof(expect_return[0]); int enum_counter = 0; - if ((bIsDisplayFeatureSupported == false) || (bIsDisplayStateFeatureSupported == false)) - return 0; - for ( enum_counter=0; enum_counter