提交 1692d889 编写于 作者: Y yangjian

feat: kvstore test add data path

Signed-off-by: Nyangjian <jianyang@bestechnic.com>
Change-Id: I2fcbad13e2bfe3e752ba437c49320fd816b5c5e0
上级 42cd311f
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
import("//test/xts/tools/lite/build/suite_lite.gni") import("//test/xts/tools/lite/build/suite_lite.gni")
declare_args() {
config_ohos_xts_acts_utils_lite_kv_store_data_path = ""
}
hctest_suite("ActsKvStoreTest") { hctest_suite("ActsKvStoreTest") {
suite_name = "acts" suite_name = "acts"
sources = [ "src/kvstore_func_test.c" ] sources = [ "src/kvstore_func_test.c" ]
...@@ -23,4 +27,6 @@ hctest_suite("ActsKvStoreTest") { ...@@ -23,4 +27,6 @@ hctest_suite("ActsKvStoreTest") {
"//base/iot_hardware/peripheral/interfaces/kits", "//base/iot_hardware/peripheral/interfaces/kits",
] ]
cflags = [ "-Wno-error" ] cflags = [ "-Wno-error" ]
defines =
[ "DATA_PATH=\"${config_ohos_xts_acts_utils_lite_kv_store_data_path}\"" ]
} }
...@@ -27,6 +27,10 @@ ...@@ -27,6 +27,10 @@
#define MAX_CACHE_NUM_TEST 10 #define MAX_CACHE_NUM_TEST 10
#define INVALID_KEY_NUM 128 #define INVALID_KEY_NUM 128
#ifndef DATA_PATH
#define DATA_PATH "/data"
#endif
/** /**
* @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency * @tc.desc : register a test suite, this suite is used to test basic flow and interface dependency
* @param : subsystem name is utils * @param : subsystem name is utils
...@@ -41,6 +45,7 @@ LITE_TEST_SUIT(utils, kvStore, KvStoreFuncTestSuite); ...@@ -41,6 +45,7 @@ LITE_TEST_SUIT(utils, kvStore, KvStoreFuncTestSuite);
*/ */
static BOOL KvStoreFuncTestSuiteSetUp(void) static BOOL KvStoreFuncTestSuiteSetUp(void)
{ {
UtilsSetEnv(DATA_PATH);
return TRUE; return TRUE;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册