Disable pw_kvs tests for device builds

This change updates the KVS tests to only build when pw_build_host_tools
is true, which is only set by the host.

Change-Id: Id08ca560543004dc72008a94d8d61590134714f1
This commit is contained in:
Alexei Frolov 2020-02-28 16:46:08 -08:00 committed by CQ Bot Account
parent fac8113baa
commit 7fe639d5cd

View File

@ -100,12 +100,27 @@ pw_test_group("pw_module_tests") {
if (host_os != "win") {
group_deps += [
# TODO(frolv): Remove these two when new KVS is ready.
"$dir_pw_kvs:tests",
"$dir_pw_minimal_cpp_stdlib:tests",
# TODO(pwbug/111): Remove this when building successfully on Windows.
"$dir_pw_tokenizer:tests",
]
if (pw_build_host_tools) {
# TODO(frolv): There are two things happening here.
#
# 1. KVS does not currently compile on Windows. Should be simple enough
# to fix.
# 2. KVS tests are not compatible with device builds as they use
# features such as std::map and are computationally expensive.
# Solving this requires a more complex capabilities-based build and
# configuration system which allowing enabling specific tests for
# targets that support them and modifying test parameters for
# different targets.
#
# Checking for pw_build_host_tools (which is only set by the host) is a
# temporary fix until the problem can be properly solved.
group_deps += [ "$dir_pw_kvs:tests" ]
}
}
}