You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
107 lines
2.3 KiB
107 lines
2.3 KiB
4 months ago
|
package {
|
||
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
||
|
}
|
||
|
|
||
|
rust_library {
|
||
|
name: "liblogger",
|
||
|
host_supported: true,
|
||
|
crate_name: "logger",
|
||
|
srcs: ["logger.rs"],
|
||
|
rustlibs: [
|
||
|
"libenv_logger",
|
||
|
"liblog_rust",
|
||
|
],
|
||
|
target: {
|
||
|
android: {
|
||
|
rustlibs: [
|
||
|
"libandroid_logger",
|
||
|
]
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
rust_library {
|
||
|
name: "liblog_event_list",
|
||
|
crate_name: "log_event_list",
|
||
|
srcs: ["liblog_event_list.rs"],
|
||
|
rustlibs: ["liblog_event_list_bindgen"],
|
||
|
shared_libs: ["liblog"],
|
||
|
}
|
||
|
|
||
|
rust_defaults {
|
||
|
name: "liblogger_test_defaults",
|
||
|
crate_name: "logger",
|
||
|
test_suites: ["general-tests"],
|
||
|
auto_gen_config: true,
|
||
|
rustlibs: [
|
||
|
"liblogger",
|
||
|
"liblog_rust",
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rust_test {
|
||
|
name: "logger_device_unit_tests",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["logger.rs"],
|
||
|
rustlibs: [
|
||
|
"libenv_logger",
|
||
|
"libandroid_logger"
|
||
|
]
|
||
|
}
|
||
|
|
||
|
rust_test_host {
|
||
|
name: "logger_host_unit_tests",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["logger.rs"],
|
||
|
rustlibs: ["libenv_logger"]
|
||
|
}
|
||
|
|
||
|
// The following tests are each run as separate targets because they all require a clean init state.
|
||
|
rust_test {
|
||
|
name: "logger_device_test_default_init",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/default_init.rs"],
|
||
|
}
|
||
|
|
||
|
rust_test_host {
|
||
|
name: "logger_host_test_default_init",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/default_init.rs"],
|
||
|
}
|
||
|
|
||
|
rust_test {
|
||
|
name: "logger_device_test_env_log_level",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/env_log_level.rs"],
|
||
|
}
|
||
|
|
||
|
rust_test_host {
|
||
|
name: "logger_host_test_env_log_level",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/env_log_level.rs"],
|
||
|
}
|
||
|
|
||
|
rust_test {
|
||
|
name: "logger_device_test_config_log_level",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/config_log_level.rs"],
|
||
|
}
|
||
|
|
||
|
rust_test_host {
|
||
|
name: "logger_host_test_config_log_level",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/config_log_level.rs"],
|
||
|
}
|
||
|
|
||
|
rust_test {
|
||
|
name: "logger_device_test_multiple_init",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/multiple_init.rs"],
|
||
|
}
|
||
|
|
||
|
rust_test_host {
|
||
|
name: "logger_host_test_multiple_init",
|
||
|
defaults: ["liblogger_test_defaults"],
|
||
|
srcs: ["tests/multiple_init.rs"],
|
||
|
}
|