From: SnickerSun Date: Tue, 26 Dec 2023 08:54:27 +0000 (+0800) Subject: 修复 xts 对gpio操作会造成死机的问题 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=89c49613b36d30087505032c4725e292ab34f8b5;p=mirrors%2FFD230.git 修复 xts 对gpio操作会造成死机的问题 --- diff --git a/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/CMakeLists.txt b/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/CMakeLists.txt index dae49b0f2..30c70c831 100755 --- a/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/CMakeLists.txt +++ b/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/CMakeLists.txt @@ -29,6 +29,7 @@ set(PRIVATE_HEADER set(PRIVATE_DEFINES CONFIG_PWM_SUPPORT CONFIG_I2C_SUPPORT + XTS_SKIP_GPIO_DEINIT ) set(PUBLIC_DEFINES diff --git a/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/src/iot_gpio_test.c b/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/src/iot_gpio_test.c index ca71f4fa9..db639f6c9 100755 --- a/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/src/iot_gpio_test.c +++ b/code/sdk/open_source/openharmony/test/xts/acts/iothardware_lite/peripheral_hal/src/iot_gpio_test.c @@ -16,9 +16,10 @@ #include "hctest.h" #include "iot_errno.h" #include "iot_gpio.h" +#include "platform_core.h" #define TEST_GPIO_SIZE 8 -const unsigned int COMPILABILITY_TEST_GPIO = 0xFFFFFFFF; +const unsigned int COMPILABILITY_TEST_GPIO = S_MGPIO10;//0xFFFFFFFF; S_MGPIO10 /** * @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency @@ -173,7 +174,9 @@ LITE_TEST_CASE(IotGpioTestSuite, testIoTGpio010, Function | MediumTest | Level1) */ LITE_TEST_CASE(IotGpioTestSuite, testIoTGpio011, Function | MediumTest | Level1) { + #ifndef XTS_SKIP_GPIO_DEINIT IoTGpioDeinit(COMPILABILITY_TEST_GPIO); + #endif }; RUN_TEST_SUITE(IotGpioTestSuite); diff --git a/code/sdk/open_source/openharmony/test/xts/tools/lite/hctest/src/hctest.c b/code/sdk/open_source/openharmony/test/xts/tools/lite/hctest/src/hctest.c index 62450d2f3..9cee30856 100755 --- a/code/sdk/open_source/openharmony/test/xts/tools/lite/hctest/src/hctest.c +++ b/code/sdk/open_source/openharmony/test/xts/tools/lite/hctest/src/hctest.c @@ -188,6 +188,15 @@ static void RunTestSuite(const char* suite_name) } } +uint8_t is_xts_test_done(void) +{ + if (g_totalSuitesNum == g_doneSuitesNum) { + return 1; + }else{ + return 0; + } +} + void LiteTestPrint(const char *fmt, ...) { va_list ap;