diff --git a/BUILD.gn b/BUILD.gn index 1b009a3702b24ac5b009f91c0550d348322a4bed..7832b35aacdd90122ff3153f781e3b56e8bedcc2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -50,7 +50,7 @@ action("liburing_configure") { } ohos_shared_library("liburing") { - configs = [ "//third_party/liburing:liburing_config" ] + public_configs = [ ":liburing_config" ] sources = [] foreach(src, liburing_source) { sources += [ "$code_dir/" + src ] @@ -62,4 +62,36 @@ ohos_shared_library("liburing") { innerapi_tags = [ "platformsdk" ] output_name = "liburing" output_extension = "so" + install_images = [ "system" ] +} + +## build for liburing test ## +ohos_executable("liburing_example_io_uring") { + sources = [ "examples/io_uring-test.c" ] + configs = [ ":liburing_config" ] + deps = [ ":liburing" ] + + install_enable = true + subsystem_name = "thirdparty" + part_name = "liburing" +} + +ohos_executable("liburing_example_io_uring_close") { + sources = [ + "examples/io_uring-close-test.c", + ] + include_dirs = [ "test" ] + configs = [ ":liburing_config" ] + deps = [ ":liburing" ] + + install_enable = true + subsystem_name = "thirdparty" + part_name = "liburing" +} + +group("uring_test") { + deps = [ + ":liburing_example_io_uring", + ":liburing_example_io_uring_close", + ] } diff --git a/bundle.json b/bundle.json index 3b1668ed598a4530a16f775e6a16296abd8c65c2..d2090c9ef3a832ea8a8f26e915722df140c33b7a 100644 --- a/bundle.json +++ b/bundle.json @@ -28,7 +28,10 @@ "third_party": [] }, "build": { - "sub_component": [], + "sub_component": [ + "//third_party/liburing:liburing", + "//third_party/liburing:uring_test" + ], "inner_kits": [ { "name": "//third_party/liburing:liburing",